public override void Draw(SpriteBatch theBatch) { textureAtlases.Draw(theBatch); plane.Draw(theBatch); foreach (Bullet bullet in plane.bullets) { bullet.Draw(theBatch); } if (isGameOver == true) { theBatch.Draw(gameover, new Vector2((screenRectangle.Width - gameover.Width) / 2, (screenRectangle.Height - gameover.Height) / 2), Color.White); } base.Draw(theBatch); }
public override void Draw(SpriteBatch theBatch) { textureAtlases.Draw(theBatch); plane.Draw(theBatch); foreach (Bullet bullet in plane.bullets) { bullet.Draw(theBatch); } if (isGameOver == true) { theBatch.Draw(gameover, new Vector2((g.screenRectangle.Width - gameover.Width) / 2, (g.screenRectangle.Height - gameover.Height) / 2), Color.White); } theBatch.DrawString(scoreFont, "Fuel level: " + plane.Fuel, new Vector2(5, 5), Color.White); base.Draw(theBatch); }