UtilitiiesButtonHandler.cs 527 B

1234567891011121314151617181920212223
  1. /*
  2. * FUNCTION: Displays the Shop Utilities menu and hides the
  3. * Shop home menu.
  4. * */
  5. using UnityEngine;
  6. using System.Collections;
  7. public class UtilitiiesButtonHandler : 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.ShopUtilities);
  16. NGUITools.SetActive(this.transform.parent.gameObject, false);
  17. }
  18. }