protected override void Draw(GameTime gameTime) { #if DEBUG countFPSDraw(gameTime); #endif GraphicsDevice.Clear(Color.Black); spriteBatch.Begin(SpriteSortMode.Deferred, null, null, null, scissorTestRasterizerState, null, display.camera); if (state == nextState) { switch (state) { case states.mission: mission.draw(); break; case states.mainMenu: mainMenu.draw(); break; case states.hangar: hangar.draw(); break; } } else if (loadScreenLoaded) { loadScreen.draw(); } #if DEBUG spriteBatch.DrawString(Verdana12, "Logic FPS: " + ups, new Vector2(11f, 446f), Color.Black); spriteBatch.DrawString(Verdana12, "Logic FPS: " + ups, new Vector2(10f, 445f), Color.White); spriteBatch.DrawString(Verdana12, "Draw FPS: " + dps, new Vector2(11f, 461f), Color.Black); spriteBatch.DrawString(Verdana12, "Draw FPS: " + dps, new Vector2(10f, 460f), Color.White); #endif spriteBatch.End(); #if DEBUG drawCount++; #endif base.Draw(gameTime); if (state == nextState) { Sleep(); } }