knockback component
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user