/// <summary> /// Deals a specific amount of damage. /// </summary> public void Deal(float amount) { if (Health <= 0 || !IsTakingDamage) { return; } amount *= DamageMultiplier; Health = Mathf.Clamp(Health - amount, 0, MaxHealth); check(); if (Health <= 0 && _motor != null) { _motor.Die(); } }