/// <summary> /// This is called when the game should draw itself. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Draw(GameTime gameTime) { /* GraphicsDevice.Clear(Color.CornflowerBlue); * spriteBatch.Begin(SpriteSortMode.FrontToBack, BlendState.AlphaBlend, null, null, null, null, null); * hud.Draw(spriteBatch,graphics.PreferredBackBufferWidth,graphics.PreferredBackBufferHeight); * * // TODO: Add your drawing code here * spriteBatch.End(); * base.Draw(gameTime);*/ GraphicsDevice.Clear(Color.WhiteSmoke); spriteBatch.Begin(SpriteSortMode.FrontToBack, BlendState.AlphaBlend, null, null, null, null, camera.transformation(GraphicsDevice)); //spriteBatch.Begin(SpriteSortMode.FrontToBack, BlendState.AlphaBlend, null, null, null, null, camera.transformation(GraphicsDevice)); // TODO: Add your drawing code here gameManager.Draw(spriteBatch); spriteBatch.End(); spriteBatch.Begin(); /*for (int i = 0; i < buttons.Count; i++) * { * buttons[i].Draw(spriteBatch, 1); * } * stick.Draw(spriteBatch, 1);*/ if (GameData.menuState == MenuState.MissionMenu) { missionScreen.Draw(spriteBatch, 0.99f); } else if (GameData.inGameState != InGameState.Paused) { hud.Draw(spriteBatch, graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight); UI.Draw(spriteBatch, 1); } else { //UI.Draw(spriteBatch, 0.9f); UpgradeSystem.Draw(spriteBatch); } /*if (gameManager.GetPlayer.playerCanLand) * { * landButton.Draw(spriteBatch, 1); * }*/ spriteBatch.End(); base.Draw(gameTime); }