public void TakeDamage(IPlayer player) { takingDamage = true; health--; if (health <= 0) { particleSystem.On = true; player.KilledEnemy(color); Explode(); } //Debug.WriteLine("Take damage"); }
public void TakeCollisionDamage(IPlayer player) { takingDamage = true; health = 0; particleSystem.On = true; player.KilledEnemy(color); Explode(); }