setup damage types and modifiers as resources
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 19s
Create tag and build when new code gets to main / Export (push) Successful in 10m48s

This commit is contained in:
2026-01-17 14:32:48 +01:00
parent b1e78df6c7
commit 6b97c226f1
16 changed files with 136 additions and 11 deletions

View File

@@ -63,6 +63,8 @@ public partial class PlayerController : CharacterBody3D, IDamageable, IKnockback
[ExportGroup("Damage")]
[Export]
public RDamage GetDamageDealt { get; set; }
[Export]
public RDamageModifier[] DamageModifiers { get; set; }
[ExportCategory("Movement")]
[ExportGroup("Ground")]
@@ -1726,10 +1728,11 @@ public partial class PlayerController : CharacterBody3D, IDamageable, IKnockback
DashIndicatorNode.LookAt(WeaponSystem.GlobalPosition);
}
}
public void TakeDamage(RDamage damage)
{
GD.Print("Ouch", damage.DamageDealt);
foreach (var damageable in DamageModifiers.ToIDamageables())
damageable.TakeDamage(damage);
}
///////////////////////////