MissionsButtonHandler.cs 557 B

1234567891011121314151617181920212223
  1. /*
  2. * FUNCTION: Handles what happens when the Mission button is tapped.
  3. * The button is located in the Main Menu.
  4. * */
  5. using UnityEngine;
  6. using System.Collections;
  7. public class MissionsButtonHandler : 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.MissionsMenu);
  16. NGUITools.SetActive(this.transform.parent.gameObject, false);
  17. }
  18. }