healer grippler

This commit is contained in:
Sveske Juice 2024-04-21 11:57:45 +02:00
parent ed56823425
commit 4572318c06
2 changed files with 2 additions and 2 deletions

View File

@ -5038,7 +5038,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
bounciness: 1
damage: 10
damage: -10
wallRebounces: 4
comingFrom: {fileID: 0}
OnReflect:

View File

@ -29,7 +29,7 @@ public class HealthComponent : MonoBehaviour
OnHealthChangeAtPos?.Invoke(transform.position, currentHealth - damage);
currentHealth -= damage;
currentHealth = (int)Mathf.Clamp(currentHealth, 0f, Mathf.Infinity);
currentHealth = (int)Mathf.Clamp(currentHealth, 0f, startHealth);
if (currentHealth == 0)
OnHealthZero?.Invoke();
}