PowerupButtonHandler.cs 522 B

1234567891011121314151617181920212223
  1. /*
  2. * FUNCTION: Displays the Shop Power-up menu and hides the
  3. * Shop Home menu.
  4. * */
  5. using UnityEngine;
  6. using System.Collections;
  7. public class PowerupButtonHandler : MonoBehaviour {
  8. private NGUIMenuScript hNGUIMenuScript;
  9. void Start ()
  10. {
  11. hNGUIMenuScript = (NGUIMenuScript)GameObject.Find("UI Root (2D)").GetComponent(typeof(NGUIMenuScript));
  12. }
  13. void OnClick ()
  14. {
  15. hNGUIMenuScript.ShowMenu(NGUIMenuScript.NGUIMenus.ShopPowerups);
  16. NGUITools.SetActive(this.transform.parent.gameObject, false);
  17. }
  18. }