Beispiel #1
0
        public void Update()
        {
            switch (CurrentState)
            {
            case GameState.MainMenu:
                MainMenu.Update();
                break;

            case GameState.Credits:
                Credits.Update();
                break;

            case GameState.Level:
                LevelController.Update();
                break;

            case GameState.WinScreen:
                WinScreen.Update();
                break;

            case GameState.LoseScreen:
                LoseScreen.Update();
                break;

            default:
                break;
            }
        }
Beispiel #2
0
        public void Update()
        {
            if (Engine.GetKey(Keys.F1))
            {
                ChangeGameState(GameState.WinScreen);
            }

            if (Engine.GetKey(Keys.F2))
            {
                ChangeGameState(GameState.GameOverScreen);
            }


            switch (CurrentState) //casos posibles de var
            {
            case GameState.MainMenu:
                EnemyListIsEmpty();
                MainMenu.Update();
                break;

            case GameState.Credits:
                Credits.Update();
                break;

            case GameState.Options:

                break;

            case GameState.GameOverScreen:
                GameOverScreen.Update();

                break;

            case GameState.WinScreen:
                WinScreen.Update();

                break;

            case GameState.Level:
                LevelController.Update();
                WinCondition();
                break;

            default:
                break;
            }
        }