/// <summary> /// Allows the game to run logic such as updating the world, /// checking for collisions, gathering input, and playing audio. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Update(GameTime gameTime) { switch (currentScreen) { case Screen.StartScreen: if (startScreen != null) { startScreen.Update(); } break; case Screen.GameScreen: if (gameScreen != null) { gameScreen.Update(gameTime); } break; case Screen.ScoreboardScreen: if (scoreboardScreen != null) { scoreboardScreen.Update(); } break; case Screen.ControlsScreen: if (controlsScreen != null) { controlsScreen.Update(); } break; case Screen.GameoverScreen: if (gameoverScreen != null) { gameoverScreen.Update(); } break; } base.Update(gameTime); }