public void SetHit(float damage) { var effectiveDamage = Mathf.Max(0f, CalculateEffectiveDamage(damage)); Health -= effectiveDamage; if (Health <= 0f) { _state = State.Killed; _gameManager.EnemyKilled(this); } }