private void Damage(HealthScript healthScript, float relativeVelocity) { if (healthScript == null || relativeVelocity < DamageVelocity) return; foreach (var damage in DamageTypes) healthScript.TakeDamage(damage.DamageValue > 0.0f ? damage.DamageValue : healthScript.MaximumHealth, damage.DamageType); }
private void Damage(HealthScript healthScript) { if (healthScript == null) return; _currentTime = 0.0f; foreach (var damage in DamageTypes) healthScript.TakeDamage(damage.DamageValue > 0.0f ? damage.DamageValue : healthScript.MaximumHealth, damage.DamageType); }