Exemplo n.º 1
0
        private bool IsCurrentScreenInHistory()
        {
            bool flag = true;

            if (Enum.IsDefined(typeof(MainScreens), this.currentlyShown.Key))
            {
                MainScreens screens = (MainScreens)Enum.Parse(typeof(MainScreens), this.currentlyShown.Key);
                if (this.GetCurrentPanel() != screens)
                {
                    flag = false;
                }
            }
            return(flag);
        }
Exemplo n.º 2
0
        private void SetPanel(MainScreens screen)
        {
            this.log.InfoFormat("SetPanel {0}", screen);
            switch (screen)
            {
            case MainScreens.MatchLobby:
                this.SendShowScreenStat(LogScreen.BattleLobby);
                break;

            case MainScreens.MatchSearching:
                this.SendShowScreenStat(LogScreen.SearchBattle);
                break;

            case MainScreens.Main:
                this.SendShowScreenStat(LogScreen.Main);
                break;

            case MainScreens.Parts:
                this.SendShowScreenStat(LogScreen.Garage);
                break;

            case MainScreens.CreateBattle:
                this.SendShowScreenStat(LogScreen.CreateCustomBattle);
                break;

            case MainScreens.StarterPack:
                this.SendShowScreenStat(LogScreen.StarterPack);
                break;

            default:
                if (screen == MainScreens.CustomBattleScreen)
                {
                    this.SendShowScreenStat(LogScreen.CustomBattles);
                }
                else if (screen == MainScreens.PlayScreen)
                {
                    this.SendShowScreenStat(LogScreen.GameModes);
                }
                break;
            }
            if (this.animator.isActiveAndEnabled)
            {
                this.animator.SetInteger("ShowPanel", (int)screen);
            }
            this.lastPanel = screen;
            this.OnPanelShow(screen);
        }