using UnityEngine; using System.Collections; public class AgHandler : MonoBehaviour { public ScreenBase BaseAgePopup; public GameObject UIWarning; public MessageCodeCap UIMessage; public ScreenBase RegScreen; public CheckBoxConditionsHandler CheckBoxConditionsHandler; public CheckBoxConditionsHandler CheckBoxAgeHandler; public UIButton ButtonAgree; void Start() { ButtonAgree.onClick.Add(new EventDelegate(ClickOk)); UIWarning.SetActive(false); } void ClickOk() { if (CheckBoxConditionsHandler.Check && CheckBoxAgeHandler.Check) { ServerGiftManager.Instance.SetAgeAction(state => { //Debug.Log(state.ToString()); switch (state.ToString()) { case "1": LoginManager.Instance.Age = true; BaseAgePopup.Hide(); RegistrationManager.Instance.Registration.SetActive(true); StartCoroutine(RegistrationManager.Instance.EnterNameDialog()); break; case "": break; } }); } } }