protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.CornflowerBlue); switch (CurrentGameState) { #region MainMenu Draw case GameState.MainMenu: GraphicsDevice.Clear(Color.White); spriteBatch.Begin(); menuManager.DrawMainMenu(spriteBatch); break; #endregion #region Pause Draw case GameState.Pause: clock.Stop(); GraphicsDevice.Clear(Color.White); spriteBatch.Begin(); menuManager.DrawPause(spriteBatch); break; #endregion #region DeadMenu Draw case GameState.DeadMenu: clock.Stop(); GraphicsDevice.Clear(Color.White); spriteBatch.Begin(); menuManager.DrawDeadMenu(spriteBatch); break; #endregion #region Playing Draw case GameState.Playing: playerManager.Draw(spriteBatch, gameTime); rainManager.Draw(spriteBatch); if (RainManager.TEST) { GraphicsDevice.Clear(Color.Red); } mapManager.Draw(spriteBatch); enemiesManager.Draw(spriteBatch); treasureManager.Draw(spriteBatch, gameTime); spriteBatch.DrawString(font, "Operation time: " + EndTime / 1000, setRightCornerFontPosition(175, 30), Color.Black); spriteBatch.DrawString(font, "Time: " + clock.ElapsedMilliseconds / 1000, setRightCornerFontPosition(175, 50), Color.Black); break; #endregion } spriteBatch.End(); }