/// <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(_managerNetwork.Active ? Color.Green : Color.Red); spriteBatch.Begin(); if (_managerNetwork.Active) { _managerPlayers.Draw(spriteBatch); _managerEnemies.Draw(spriteBatch); } spriteBatch.End(); base.Draw(gameTime); }
protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.CornflowerBlue); spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, null, null, null, null, camera.transform); managerMap.Draw(spriteBatch); managerEnemies.Draw(spriteBatch); managerUnits.Draw(spriteBatch); managerBuildings.Draw(spriteBatch); managerMouse.Draw(spriteBatch); spriteBatch.End(); spriteBatch.Begin(); managerUI.DrawBack(spriteBatch); managerUI.Draw(spriteBatch); managerUnits.DrawUI(spriteBatch); managerEnemies.DrawUI(spriteBatch); managerBuildings.DrawUI(spriteBatch); spriteBatch.End(); base.Draw(gameTime); }
public override void Draw(SpriteBatch spriteBatch) { spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, null, null, null, null, Warcraft.camera.transform); managerIsland.Draw(spriteBatch); //managerEA.Draw(spriteBatch); managerPlayerUnits.Draw(spriteBatch); managerPlayerBuildings.Draw(spriteBatch); managerEnemies.Draw(spriteBatch); managerMouse.Draw(spriteBatch); spriteBatch.End(); spriteBatch.Begin(); managerUI.DrawBack(spriteBatch); managerUI.Draw(spriteBatch); managerPlayerUnits.DrawUI(spriteBatch); managerPlayerBuildings.DrawUI(spriteBatch); managerEnemies.DrawUI(spriteBatch); if (Battleship.move || !start) { spriteBatch.Draw(cursor, new Rectangle(0, 0, Warcraft.WINDOWS_WIDTH, Warcraft.WINDOWS_HEIGHT), new Color(0, 0, 0, fadeOut)); if (!start) { spriteBatch.Draw(cursor, new Rectangle(0, 0, Warcraft.WINDOWS_WIDTH, Warcraft.WINDOWS_HEIGHT), Color.Black); summary.DrawStart(spriteBatch); } if (showSummary) { summary.Draw(spriteBatch, managerPlayerUnits, managerEnemies.managerUnits); } } spriteBatch.End(); }