Ejemplo n.º 1
0
        private void AddState(UIState state, SSCUIState uistate)
        {
            var profileinterface = new ConditionalInterface(() => _canShowUITable[uistate]);

            profileinterface.SetState(state);
            _cdInterface.Add(profileinterface);
        }
Ejemplo n.º 2
0
        private void InitUI()
        {
            InterfaceManager = new CDInterfaceManager();

            musicUI = new ConditionalInterface(() => CanShowMusicPlayUI);
            musicUI.SetState(new MusicPlayUI());

            floatingDisplayUI = new ConditionalInterface(() => true);
            floatingDisplayUI.SetState(new TransparentFloatingDisplayerUI());

            InterfaceManager.Add(musicUI);
            // InterfaceManager.Add(floatingDisplayUI);
        }
Ejemplo n.º 3
0
        internal void SetWindows()
        {
            _loginWindowState = new LoginWindowState();
            var loginWindow = new ConditionalInterface(() => _canShowUITable[SSCUIState.LoginWindow]);

            loginWindow.SetState(_loginWindowState);
            _cdInterface.Add(loginWindow);

            _playerOnlineWindow = new PlayerOnlineWindow();
            var playerOnlineWindow = new ConditionalInterface(() => _canShowUITable[SSCUIState.PlayerOnlineWindow]);

            playerOnlineWindow.SetState(_playerOnlineWindow);
            _cdInterface.Add(playerOnlineWindow);

            _homePageState = new HomePageState();
            var hompage = new ConditionalInterface(() => _canShowUITable[SSCUIState.HomePage]);

            hompage.SetState(_homePageState);
            _cdInterface.Add(hompage);

            _communicationState = new CommunicationState();
            var commPage = new ConditionalInterface(() => _canShowUITable[SSCUIState.CommunicationPage]);

            commPage.SetState(_communicationState);
            _cdInterface.Add(commPage);


            _mainPageState = new MailPageState();
            var mailPage = new ConditionalInterface(() => _canShowUITable[SSCUIState.MailPage]);

            mailPage.SetState(_mainPageState);
            _cdInterface.Add(mailPage);


            _unionPageState2 = new UnionPageState2();
            var unionpage2 = new ConditionalInterface(() => _canShowUITable[SSCUIState.UnionPage2]);

            unionpage2.SetState(_unionPageState2);
            _cdInterface.Add(unionpage2);

            _unionPageState = new UnionPageState();
            var unionpage = new ConditionalInterface(() => _canShowUITable[SSCUIState.UnionPage]);

            unionpage.SetState(_unionPageState);
            _cdInterface.Add(unionpage);

            _unionCandidateState = new UnionCandidatePage();
            var cddpage = new ConditionalInterface(() => _canShowUITable[SSCUIState.UnionCandidatePage]);

            cddpage.SetState(_unionCandidateState);
            _cdInterface.Add(cddpage);

            _unionCreateState = new UnionCreatePage();
            var unioncreatepage = new ConditionalInterface(() => _canShowUITable[SSCUIState.UnionPage3]);

            unioncreatepage.SetState(_unionCreateState);
            _cdInterface.Add(unioncreatepage);


            _rankBoardState = new RankBoardState();
            var rankpage = new ConditionalInterface(() => _canShowUITable[SSCUIState.RankBoard]);

            rankpage.SetState(_rankBoardState);
            _cdInterface.Add(rankpage);

            _getitemState = new ItemUIState();
            var itempage = new ConditionalInterface(() => _canShowUITable[SSCUIState.ItemPage]);

            itempage.SetState(_getitemState);
            _cdInterface.Add(itempage);

            _getnpcState = new NPCUIState();
            var uinpcinterface = new ConditionalInterface(() => _canShowUITable[SSCUIState.NPCPage]);

            uinpcinterface.SetState(_getnpcState);
            _cdInterface.Add(uinpcinterface);


            _gameCenterState = new GameCenterState();
            var uiGameCenter = new ConditionalInterface(() => _canShowUITable[SSCUIState.GameCenterPage]);

            uiGameCenter.SetState(_gameCenterState);
            _cdInterface.Add(uiGameCenter);

            _playerInventoryState  = new PlayerInventoryState();
            _playerInventoryState2 = new PlayerInventoryState2();
            AddState(_playerInventoryState, SSCUIState.InventoryPage);
            AddState(_playerInventoryState2, SSCUIState.InventoryPage2);

            normalShopState = new NormalShopState();
            AddState(normalShopState, SSCUIState.NormalShopPage);

            AddState(new NormalShopBuyState(), SSCUIState.NormalShopBuyPage);
            AddState(new LotteryState(), SSCUIState.LotteryPage);


            var unionDonateState     = new UnionDonationPage();
            var uniondonateInterface = new ConditionalInterface(() => _canShowUITable[SSCUIState.UnionDonationPage]);

            uniondonateInterface.SetState(unionDonateState);
            _cdInterface.Add(uniondonateInterface);

            // 置顶
            _playerProfileState = new PlayerProfileState();
            var profileinterface = new ConditionalInterface(() => _canShowUITable[SSCUIState.ProfilePage]);

            profileinterface.SetState(_playerProfileState);
            _cdInterface.Add(profileinterface);
        }