/// <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) { if (menu.Enabled) { menu.Draw(); } else { GraphicsDevice.Clear(Color.Black); sky.Draw(camera); GraphicsDevice.BlendState = BlendState.Opaque; GraphicsDevice.DepthStencilState = DepthStencilState.Default; GraphicsDevice.SamplerStates[0] = SamplerState.LinearWrap; GraphicsDevice.RasterizerState = rs; terrain.Draw(gameTime); tankController.Draw(camera.View, projection); if (debug) { this.DrawDebugInfo(); } } base.Draw(gameTime); }