knockback component

This commit is contained in:
2026-01-18 12:39:01 +01:00
parent 9690280cd7
commit 35b9ea383c
21 changed files with 180 additions and 49 deletions

View File

@@ -18,10 +18,10 @@ public partial class CHealth : Node, IHealthable
CurrentHealth = RHealth.StartingHealth;
}
public void ReduceHealth(IDamageable source, float amount)
public void ReduceHealth(IDamageable source, DamageRecord damageRecord)
{
GD.Print(CurrentHealth);
CurrentHealth -= amount;
CurrentHealth -= damageRecord.Damage.DamageDealt;
HealthChanged?.Invoke(this, CurrentHealth);
if (CurrentHealth <= 0)