CostumesButtonHandler.cs 576 B

123456789101112131415161718192021222324
  1. /*
  2. * FUNCTION: Handles what happens when the Costumes Button is clicked.
  3. * The costume button is located in the Shop Home menu.
  4. *
  5. * */
  6. using UnityEngine;
  7. using System.Collections;
  8. public class CostumesButtonHandler : MonoBehaviour {
  9. private NGUIMenuScript hNGUIMenuScript;
  10. void Start ()
  11. {
  12. hNGUIMenuScript = (NGUIMenuScript)GameObject.Find("UI Root (2D)").GetComponent(typeof(NGUIMenuScript));
  13. }
  14. void OnClick ()
  15. {
  16. hNGUIMenuScript.ShowMenu(NGUIMenuScript.NGUIMenus.ShopCostumes);
  17. NGUITools.SetActive(this.transform.parent.gameObject, false);
  18. }
  19. }