/// <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); // Starter code spriteBatch.Begin(); spriteBatch.Draw(spaceTex, screenRect, Color.White); foreach (Missile m in missiles) { m.Draw(spriteBatch, missileTex); } ship.Draw(spriteBatch, gameTime); 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); // Starter code spriteBatch.Begin(); spriteBatch.Draw(spaceTex, screenRect, Color.White); // TODO: Add your drawing code here //For each missle draw it foreach (Missile m in missileList) { m.Draw(spriteBatch, gameTime); } //Then draw the ship ship.Draw(spriteBatch, gameTime); spriteBatch.End(); base.Draw(gameTime); }