private void Hit(Collider2D collision) { health -= laserDamageDealer.GetDamage(); laserDamageDealer.Hit(); if (health <= 0f) { Die(); } }
private void HealthUpdater(LaserDamageDealer laserDamageDealer) { health -= laserDamageDealer.GetDamage(); laserDamageDealer.Hit(); if (health <= 0) { Explode(); } }