Exemplo n.º 1
0
        void OnBackHallETClick(BaseEventData data)
        {
            if (menuUiAdapter != null)
            {
                _viewModel.rootActiveSelf = false;
                //UnRegisterReceive();

                string title      = "";
                bool   isOverGame = menuUiAdapter.PlayStaue == (int)EPlayerLifeState.Dead || menuUiAdapter.WarVictory;
                bool   isHx       = menuUiAdapter.IsHXMod;
                title =
                    isOverGame ? I2.Loc.ScriptLocalization.client_common.word13 :
                    isHx ? "放弃角逐冠军不会影响奖励,您确定要终止演习嘛?":
                    I2.Loc.ScriptLocalization.client_common.word14;

                string yesText = I2.Loc.ScriptLocalization.client_common.word15;
                Action yesCB   = HallUtility.GameOver;
                Action noCB    = () =>
                {
                    showNotice = false;
                    ShowMenu(false);
                };

                string noText = I2.Loc.ScriptLocalization.client_common.word16;

                menuUiAdapter.ShowNoticeWindow(title, yesCB, noCB, yesText, noText);
                showNotice = true;
            }
        }
Exemplo n.º 2
0
        void OnBackHallETClick(BaseEventData data)
        {
            if (menuUiAdapter != null)
            {
                _viewModel.rootActiveSelf = false;
                menuUiAdapter.UnRegisterKeyReceive(keyReceive);
                menuUiAdapter.UnRegisterPointerReceive(pointerReceiver);


                string title      = "";
                bool   isOverGame = menuUiAdapter.PlayStaue == (int)EPlayerLifeState.Dead || menuUiAdapter.WarVictory;

                title = isOverGame ? I2.Loc.ScriptLocalization.client_common.word13 : I2.Loc.ScriptLocalization.client_common.word14;

                string yesText = I2.Loc.ScriptLocalization.client_common.word15;
                Action yesCB   = () =>
                {
                    HallUtility.GameOver();
                };
                Action noCB = () =>
                {
                    _viewModel.rootActiveSelf = true;
                    menuUiAdapter.RegisterKeyReceive(keyReceive);
                    menuUiAdapter.RegisterPointerReceive(pointerReceiver);
                    menuUiAdapter.SetCrossVisible(false);
                };

                string noText = I2.Loc.ScriptLocalization.client_common.word16;

                menuUiAdapter.ShowNoticeWindow(title, yesCB, noCB, yesText, noText);
            }
        }