public void Draw(SpriteBatch spriteBatch, SpriteFont font, Texture2D bulletTex) { for (int i = 0; i < MaxBullets; i++) { bullets[i].Draw(spriteBatch, bulletTex, Color.GreenYellow); } particleEngine.Draw(spriteBatch); spriteBatch.Draw(texture, pos, null, Color.White, rotation, origin, 1.0F, SpriteEffects.None, 0.0f); }
public virtual void Draw(SpriteBatch spriteBatch, Texture2D bulletTex) { foreach (Bullet b in bullets) { b.Draw(spriteBatch, bulletTex, bulletColor); } particleEngine.Draw(spriteBatch); if (alive) { spriteBatch.Draw(texture, pos, null, Color.White, rotation, origin, 1.0F, SpriteEffects.None, 0.0f); //health: healthRect = new Rectangle((int)pos.X - 40, (int)pos.Y - 50, healthBarWidth, 15); backgroundHealthRect = new Rectangle((int)pos.X - 40, (int)pos.Y - 50, HealthBarMaxLength, 15); spriteBatch.Draw(healthBackgroundTex, backgroundHealthRect, backHealthBarColor * 0.7f); spriteBatch.Draw(currentHealthTex, healthRect, healthBarColor * 0.7f); } }