コード例 #1
0
ファイル: Powerup.cs プロジェクト: kindohm/tanks
 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();
     }
 }
コード例 #2
0
ファイル: Powerup.cs プロジェクト: kindohm/tanks
 void Acquire(Projectile projectile)
 {
     if (this.PowerupAcquired != null)
     {
         this.PowerupAcquired(this, new PowerupAcquiredEventArgs(projectile.Source, this));
     }
 }
コード例 #3
0
ファイル: ProjectileEventArgs.cs プロジェクト: kindohm/tanks
 public ProjectileEventArgs(Projectile projectile)
 {
     this.Projectile = projectile;
 }
コード例 #4
0
 public ProjectileExplodedEventArgs(Projectile projectile, BaseGameObject target)
 {
     this.Projectile = projectile;
     this.Target = target;
 }
コード例 #5
0
ファイル: Vehicle.cs プロジェクト: kindohm/tanks
 public void TakeHit(Projectile projectile)
 {
     if (this.TookHit != null)
     {
         this.TookHit(this, new VehicleEventArgs(this));
     }
 }