コード例 #1
0
        protected override void OnButtonClickWithButtonName(CocoUINormalButton button, string pButtonName)
        {
            base.OnButtonClickWithButtonName(button, pButtonName);

            switch (pButtonName)
            {
            case "doll":
                CocoMainController.ShowPopup("RoleSelectedPopup");
                m_RoleSelectPopup = FindObjectOfType <RoleSelectedPopup>();
                if (m_RoleSelectPopup != null)
                {
                    m_RoleSelectPopup.OnCloseDollSelect += OnChangeDoll;
                }
                break;

            case "Talk":
                StartCoroutine(HideTalk());
                break;

            case "start":
                GlobalData.curSelectRole = -1;
                CocoMainController.EnterScene(CocoSceneID.Doll);
                break;
            }
        }
コード例 #2
0
        protected override void OnButtonClickWithButtonName(CocoUINormalButton button, string pButtonName)
        {
            base.OnButtonClickWithButtonName(button, pButtonName);

            if (pButtonName == "next")
            {
                switch (m_CurSceneStep)
                {
                case SceneStep.Step_Common:
                    m_CurSceneStep = SceneStep.Step_Detail;
                    StartCoroutine(ShowDetail());
                    break;

                case SceneStep.Step_Detail:
                    m_CurSceneStep = SceneStep.Step_Finish;
                    button.gameObject.SetActive(false);
                    StartCoroutine(PlayAni());
                    break;

                default:
                    m_CurSceneStep = SceneStep.Step_Common;
                    break;
                }
            }
            else if (pButtonName == "font")
            {
                switch (m_CurSceneStep)
                {
                case SceneStep.Step_Common:
                    CocoMainController.EnterScene(CocoSceneID.Map);
                    break;

                case SceneStep.Step_Detail:
                    m_CurSceneStep = SceneStep.Step_Common;
                    break;

                case SceneStep.Step_Finish:
                    m_CurSceneStep = SceneStep.Step_Detail;
                    StartCoroutine(ShowDetail());
                    break;

                default:
                    m_CurSceneStep = SceneStep.Step_Common;
                    break;
                }
            }
            else if (pButtonName == "doll")
            {
                CocoMainController.ShowPopup("RoleSelectedPopup");
                m_RoleSelectPopup = FindObjectOfType <RoleSelectedPopup>();
                if (m_RoleSelectPopup != null)
                {
                    m_RoleSelectPopup.OnCloseDollSelect += OnChangeDoll;
                }
            }
        }
コード例 #3
0
        public static void Show(string title, string message, string button, string otherButton, Action <string> buttonAction)
        {
            var alertView = CocoMainController.ShowPopup <SimpleAlertView> ("native/SimpleAlertView");

            if (alertView == null)
            {
                return;
            }

            alertView.InitContent(title, message, button, otherButton);

            alertView._onButtonClickEvent = buttonAction;
        }