Exemple #1
0
    /// <summary>
    /// Draws the current state of the game to the screen.
    /// </summary>
    /// <remarks>
    /// What is drawn depends upon the state of the game.
    /// </remarks>
    public void DrawScreen()
    {
        screenController.DrawBackground();

        switch (CurrentState)
        {
        case GameState.ViewingMainMenu:
            _menuController.DrawMainMenu();
            break;

        case GameState.ViewingGameMenu:
            _menuController.DrawGameMenu();
            break;

        case GameState.AlteringSettings:
            _menuController.DrawSettings();
            break;

        case GameState.Deploying:
            _deploymentController.DrawDeployment();
            break;

        case GameState.Discovering:
            _discoveryController.DrawDiscovery();
            break;

        case GameState.EndingGame:
            _endingGameController.DrawEndOfGame();
            break;

        case GameState.ViewingHighScores:
            highScoreController.DrawHighScores();
            break;
        }

        screenController.DrawAnimations();

        SwinGame.RefreshScreen();
    }