Пример #1
0
        public override void Update(GameTime gameTime)
        {
            switch (NogardGame.GameState)
            {
            case NogardGame.GameStateEnum.MainMenu:
                foreach (var b in Buttons)
                {
                    b.Update(Color.Goldenrod, Color.Yellow);
                }
                break;

            case NogardGame.GameStateEnum.Story:
                if (StoryMode.IntroStory)
                {
                    BackButton.Update(Color.Goldenrod, Color.Black);
                }
                else
                {
                    ContinueButton.Update(Color.Goldenrod, Color.Black);
                }
                break;

            case NogardGame.GameStateEnum.GameActive:
                break;

            case NogardGame.GameStateEnum.HighScoreView:
                foreach (var b in Buttons)
                {
                    b.Update(Color.Goldenrod, Color.Black);
                }
                break;

            case NogardGame.GameStateEnum.Pause:
                foreach (var b in Buttons)
                {
                    b.Update(Color.Goldenrod, Color.Yellow);
                }
                break;

            case NogardGame.GameStateEnum.GameOver:
                foreach (var b in Buttons)
                {
                    b.Update(Color.White, Color.Black);
                    if (b.Equals(SaveScoreButton) && GameOverManager.ScoreForm.GameSaved)
                    {
                        b.Update(Color.Transparent, Color.Transparent);
                    }
                }
                break;

            case NogardGame.GameStateEnum.MapMaker:
                break;

            case NogardGame.GameStateEnum.LevelSelector:
                foreach (var b in Buttons)
                {
                    b.Update(Color.Goldenrod, Color.Yellow);
                }
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }