Exemplo n.º 1
0
        protected override void RegisterUIEvent()
        {
            BtnContinue.OnClickAsObservable().Subscribe(_ =>
            {
                //UIMgr.GetPanel<UIGamePanel>().mData.ShowCharacters = true;
                UIMgr.GetPanel <UIGamePanel>().Transform.Find("Characters").gameObject.SetActive(true);
                UIMgr.GetPanel <UIGamePanel>().Transform.Find("Emenys").gameObject.SetActive(true);
                CloseSelf();
            });

            BtnRestart.OnClickAsObservable().Subscribe(_ =>
            {
                //UIMgr.GetPanel<UIGamePanel>().mData.ShowCharacters = true;
                UIMgr.GetPanel <UIGamePanel>().Transform.Find("Characters").gameObject.SetActive(true);
                UIMgr.GetPanel <UIGamePanel>().Transform.Find("Emenys").gameObject.SetActive(true);
                CloseSelf();
            });
            BtnGiveUp.OnClickAsObservable().Subscribe(_ =>
            {
                CloseSelf();
                UIMgr.ClosePanel <UIGamePanel>();
            });

            BtnSetting.OnClickAsObservable().Subscribe(_ =>
            {
                UIMgr.OpenPanel <UIGamePauseSettingPanel>();
            });
        }
Exemplo n.º 2
0
        protected override void OnOpen(QFramework.IUIData uiData)
        {
            mData = uiData as UIHomePanelData ?? mData;

            if (mData.ShowRestartBtn)
            {
                BtnRestart.Show();
            }
        }