// '' <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 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.Deploying: DeploymentController.DrawDeployment(); break; case GameState.Discovering: DiscoveryController.DrawDiscovery(); break; case GameState.EndingGame: EndingGameController.DrawEndOfGame(); break; case GameState.ViewingHighScores: HighScoreController.DrawHighScores(); break; } UtilityFunctions.DrawAnimations(); SwinGame.RefreshScreen(); }
/// <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 static void DrawScreen() { UtilityFunctions.DrawBackground(); switch (CurrentState) { case var @case when @case == GameState.ViewingMainMenu: { MenuController.DrawMainMenu(); break; } case var case1 when case1 == GameState.ViewingGameMenu: { MenuController.DrawGameMenu(); break; } case var case2 when case2 == GameState.AlteringSettings: { MenuController.DrawSettings(); break; } case var case3 when case3 == GameState.Deploying: { DeploymentController.DrawDeployment(); break; } case var case4 when case4 == GameState.Discovering: { DiscoveryController.DrawDiscovery(); break; } case var case5 when case5 == GameState.EndingGame: { EndingGameController.DrawEndOfGame(); break; } case var case6 when case6 == GameState.ViewingHighScores: { HighScoreController.DrawHighScores(); break; } } UtilityFunctions.DrawAnimations(); SwinGame.RefreshScreen(); }
/// <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 static void DrawScreen() { UtilityFunctions.DrawBackground(); if (CurrentState == GameState.ViewingMainMenu) { MenuController.DrawMainMenu(); } else if (CurrentState == GameState.ViewingGameMenu) { MenuController.DrawGameMenu(); } else if (CurrentState == GameState.AlteringSettings) { MenuController.DrawSettings(); } else if (CurrentState == GameState.Deploying) { DeploymentController.DrawDeployment(); } else if (CurrentState == GameState.Discovering) { DiscoveryController.DrawDiscovery(); } else if (CurrentState == GameState.EndingGame) { EndingGameController.DrawEndOfGame(); } else if (CurrentState == GameState.ViewingHighScores) { HighScoreController.DrawHighScores(); } UtilityFunctions.DrawAnimations(); SwinGame.RefreshScreen(); }