Implement health modification on enemy kill; add HealOnKillModifier and update death behavior

This commit is contained in:
2025-07-12 12:57:21 +02:00
parent cb793bcc93
commit c3b1ac9213
22 changed files with 330 additions and 11 deletions

View File

@@ -9,6 +9,7 @@ namespace Systems
{
[Self, SerializeField] private Character character;
[Self, SerializeField] private InterfaceRef<IDeathBehavior> deathBehavior;
[Self, SerializeField] private Health health;
private void OnEnable()
{
@@ -30,7 +31,8 @@ namespace Systems
private void Die()
{
deathBehavior.Value.Die();
var lastAttacker = health.LastAttacker;
deathBehavior.Value.Die(lastAttacker);
}
}
}