void CreateDieExplosion() { Random rng = new Random(); Vector2 position = TKMath.GetAngleVector((float)rng.NextDouble() * 360f) * ((float)rng.NextDouble() * size.X * 0.5f); EffectExplosion.CreateExplosion(Position + position, 0.8f, Map); }
public override void Logic() { if (!IsAlive) { if (!dieTimer.IsDone) { dieTimer.Logic(); dieExplosionTimer.Logic(); if (dieExplosionTimer.IsDone) { CreateDieExplosion(); dieExplosionTimer.Reset(); } if (dieTimer.IsDone) { EffectExplosion.CreateExplosion(Position, 5f, Map); } } return; } healthBar.Progress = health / MaxHealth; healthBar.Logic(); }
public override void Die(Vector2 diePos) { base.Die(diePos); EffectExplosion.CreateExplosion(diePos, 0.7f, Map); Map.RemoveCreep(this); }
public void ReceiveDie() { EffectExplosion.CreateExplosion(Position, 1.8f, Map); if (point != null) { point.Reset(); } Map.TowerDestroyed(this); health = 0; }