/// <summary> /// Draws the player and his bullets /// </summary> /// <param name="rend">Renderer for drawing</param> public override void Draw(Renderer rend) { base.Draw(rend); foreach (Bullet b in ActiveBullets) { b.Draw(rend); } }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { prevKeyboardState = Keyboard.GetState(); rend = new Renderer(GraphicsDevice); sManager = new EntityManager(GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height); base.Initialize(); }
public void Draw(Renderer rend) { // Draw the asteroids... foreach (Asteroid a in ActiveAsteroids) { a.Draw(rend); } //...the player... Player.Draw(rend); }
/// <summary> /// Draws the entity. /// </summary> /// <param name="rend">Renderer to use for drawing</param> public virtual void Draw(Renderer rend) { rend.Draw(Body); }