void HandleProjectileHit(Projectile projectile) { this.Body.Position = this.Body.Position; this.hitPoints = this.hitPoints - projectile.Damage; if (this.hitPoints <= 0) { this.Acquire(projectile); this.Expire(); } }
void Acquire(Projectile projectile) { if (this.PowerupAcquired != null) { this.PowerupAcquired(this, new PowerupAcquiredEventArgs(projectile.Source, this)); } }
public ProjectileEventArgs(Projectile projectile) { this.Projectile = projectile; }
public ProjectileExplodedEventArgs(Projectile projectile, BaseGameObject target) { this.Projectile = projectile; this.Target = target; }
public void TakeHit(Projectile projectile) { if (this.TookHit != null) { this.TookHit(this, new VehicleEventArgs(this)); } }