/// <summary> /// Acts as a drawing delegate for DrawObjectWithTransform /// After performing the necessary transformation (translate/rotate) /// DrawObjectWithTransform will invoke this method /// </summary> /// <param name="o">The object to draw</param> /// <param name="e">The PaintEventArgs to access the graphics</param> private void ProjectileDrawer(object o, PaintEventArgs e) { Projectile p = o as Projectile; int projectileWidth = 20; if (p.isAlive()) { e.Graphics.DrawImage(shipProjectile[p.getOwner() % 8], -(projectileWidth / 2), -(projectileWidth / 2), projectileWidth, projectileWidth); } }