SettingsNewButtonHandler.cs 695 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * FUNCTION: Handles what happens when the Settings button is tapped.
  3. * The button is located in the Main Menu.
  4. * */
  5. using UnityEngine;
  6. using System.Collections;
  7. public class SettingsNewButtonHandler : MonoBehaviour
  8. {
  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.Settings);
  17. NGUITools.SetActive(this.transform.parent.gameObject, false);
  18. NameSanta.text = RegistrationManager.Instance.CurName;
  19. //Debug.Log(RegistrationManager.Instance.CurName);
  20. }
  21. public UILabel NameSanta;
  22. }