protected virtual void projectile_Exploded(object sender, ProjectileExplodedEventArgs e) { this.projectileList.Remove(e.Projectile); }
void projectile_Exploded(object sender, ProjectileExplodedEventArgs e) { if (e.Target == null) { return; } if (e.Target is Vehicle & this.HitTarget != null) { this.HitTarget(this, new HitTargetEventArgs(this, e.Target as Vehicle)); } else if (e.Target is Projectile & this.HitProjectile != null) { this.HitProjectile(this, new VehicleEventArgs(this)); } else if (e.Target is Powerup & this.HitPowerup != null) { this.HitPowerup(this, new VehicleEventArgs(this)); } }