Пример #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();
     }
 }