예제 #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
 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));
     }
 }