예제 #1
0
    //Draw the gamestate every loop
    public void draw(GameTime gameTime, SpriteBatch spriteBatch)
    {
        switch (State)
        {
        case state.Playing:
            playingState.draw(gameTime, spriteBatch);
            break;

        case state.Menu:
            menuState.draw(gameTime, spriteBatch);
            break;

        case state.Pause:
            playingState.draw(gameTime, spriteBatch);
            break;

        case state.Settings:
            settingsState.draw(gameTime, spriteBatch);
            break;

        case state.PauseSettings:
            playingState.draw(gameTime, spriteBatch);
            break;

        case state.Victory:
            victoryState.draw(gameTime, spriteBatch);
            break;

        case state.Defeat:
            defeatState.draw(gameTime, spriteBatch);
            break;
        }
    }