예제 #1
0
 public override void Update()
 {
     base.Update();
     if (Collided && CollisionTester.CollidingObject is Enemy)
     {
         SlowEnemiesInRange();
         ExplosionAnimator.StartExplosion(Game, this, typeof(WaterTurretProjectileExplosion));
         Destroy();
     }
 }
예제 #2
0
 public override void Update()
 {
     base.Update();
     if (Collided)
     {
         if (CollisionTester.CollidingObject is Enemy)
         {
             DamageEnemiesInRange();
             ExplosionAnimator.StartExplosion(Game, this, typeof(BigExplosion));
             Destroy();
         }
     }
 }
예제 #3
0
 public override void Update()
 {
     base.Update();
     if (Collided)
     {
         Enemy collidingEnemy = CollisionTester.CollidingObject as Enemy;
         if (collidingEnemy != null)
         {
             collidingEnemy.Damage(Damage, this);
             ExplosionAnimator.StartExplosion(Game, this, typeof(TankBulletExplosion));
             Destroy();
         }
     }
 }
예제 #4
0
 public override void Damage(int damage, WeaponProjectile damageSource)
 {
     HitPoints -= damage;
     if (HitPoints > 0)
     {
         AnimateDamage();
     }
     else
     {
         if (animatingDamage)
         {
             CancelDamageAnimation();
         }
         ExplosionAnimator.StartExplosion(Game, this, damageSource);
         Game.PlayerCash += CashForKilling;
         Destroy();
     }
 }