public override void Update() { base.Update(); if (Collided && CollisionTester.CollidingObject is Enemy) { SlowEnemiesInRange(); ExplosionAnimator.StartExplosion(Game, this, typeof(WaterTurretProjectileExplosion)); Destroy(); } }
public override void Update() { base.Update(); if (Collided) { if (CollisionTester.CollidingObject is Enemy) { DamageEnemiesInRange(); ExplosionAnimator.StartExplosion(Game, this, typeof(BigExplosion)); Destroy(); } } }
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(); } } }
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(); } }