コード例 #1
0
        // Draws the current state of the game to the screen.
        // What is drawn depends on the current state of the game.
        public static void DrawScreen()
        {
            UtilityFunctions.DrawBackground();
            switch (CurrentState)
            {
            case GameState.ViewingMainMenu:
                MenuController.DrawMainMenu();
                break;

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

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

            case GameState.AlteringShipSettings:
                MenuController.DrawShipsMenu();
                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;

            case GameState.ChangingThemes:
                MenuController.DrawThemeMenu();
                break;
            }
            UtilityFunctions.DrawAnimations();
            SwinGame.RefreshScreen();
        }