InstructionButtonHandler.cs 597 B

1234567891011121314151617181920212223
  1. /*
  2. * FUNCTION: Handles what happens when the Instruction button is tapped.
  3. * The button is located in the Main Menu.
  4. * */
  5. using UnityEngine;
  6. using System.Collections;
  7. public class InstructionButtonHandler : MonoBehaviour {
  8. private NGUIMenuScript hNGUIMenuScript;
  9. public static bool FirstPlay;
  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.InstructionsMenu);
  17. NGUITools.SetActive(this.transform.parent.gameObject, false);
  18. }
  19. }