/// <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); // TODO: Add your drawing code here spriteBatch.Begin(); player.Draw(spriteBatch); foreach (Fire a in balls) // Loop through List with foreach { a.Draw(spriteBatch); } foreach (Enemy a in enemies) // Loop through List with foreach { a.Draw(spriteBatch); } //Draw the healthbar on the screen mHealthbar.Draw(spriteBatch, this.Window); //Draw the fuelbar to the screen mFuelbar.Draw(spriteBatch, this.Window); mMouseIconSprite.Draw(spriteBatch); spriteBatch.End(); base.Draw(gameTime); }
/// <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); // TODO: Add your drawing code here spriteBatch.Begin(); foreach (Fire a in balls) // Loop through List with foreach { a.Draw(spriteBatch); } foreach (Enemy a in enemies) // Loop through List with foreach { a.Draw(spriteBatch); } player.Draw(spriteBatch); mMouseIconSprite.Draw(spriteBatch); spriteBatch.End(); base.Draw(gameTime); }