Beispiel #1
0
        public override void Recycle()
        {
            base.Recycle();
            UnregisterListeners();
            CommonUI commonUi = Global.gApp.gUiMgr.GetPanelCompent <CommonUI>(Wndid.CommonPanel);

            commonUi.ResetOrderLayer();
            TokenUI tokenUi = Global.gApp.gUiMgr.GetPanelCompent <TokenUI>(Wndid.TokenUI);

            tokenUi?.SetAddGoldValid(true);
            Global.gApp.gMainRoleUI.RemoveDragCtrl();
            Global.gApp.gMainRoleUI.Hide();
            CloseSubPanels();
        }
Beispiel #2
0
        public override void Release()
        {
            base.Release();
            UnregisterListeners();
            CommonUI commonUi = Global.gApp.gUiMgr.GetPanelCompent <CommonUI>(Wndid.CommonPanel);

            commonUi.ResetOrderLayer();
            TokenUI tokenUi = Global.gApp.gUiMgr.GetPanelCompent <TokenUI>(Wndid.TokenUI);

            tokenUi?.SetAddGoldValid(true);
            if (gameObject.activeSelf)
            {
                Global.gApp.gMainRoleUI.Hide();
            }
            CloseSubPanels();
        }
Beispiel #3
0
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);
            Global.gApp.gMainRoleUI.Show();
            var dragRoleModel = RotateNode.gameObject.GetComponent <DragRoleModel>();

            Global.gApp.gMainRoleUI.AddDragCtrl(dragRoleModel);
            RefreshMainWeaponData();
            RefreshLevelList();
            RefreshIdleReward();
            RefreshIdleRate();
            RegisterListeners();
            InvokeRepeating("RefreshIdleReward", 60f, 60f);
            CommonUI commonUi = Global.gApp.gUiMgr.GetPanelCompent <CommonUI>(Wndid.CommonPanel);

            commonUi?.SetOrderLayer(info.Order - 1);
            TokenUI tokenUi = Global.gApp.gUiMgr.GetPanelCompent <TokenUI>(Wndid.TokenUI);

            tokenUi?.SetAddGoldValid(false);
            bool idleRewardOpen = PlayerDataMgr.singleton.ModuleIsOpen(GameModuleType.IdleReward);

            IdleRewardNode.gameObject.SetActive(idleRewardOpen);
            QuickIdleNode.gameObject.SetActive(idleRewardOpen);
        }