Death animations and spawner

This commit is contained in:
Marco 2025-02-23 19:19:12 +01:00
commit 16b7d936c9
13 changed files with 286 additions and 11 deletions

View file

@ -18,6 +18,7 @@ public partial class DamageReceiverActorModule : ActorModule
{
_actor = actor;
HealthProvider.FillResource();
HealthProvider.ResourceDepleted += OnDeath;
}
@ -61,6 +62,6 @@ public partial class DamageReceiverActorModule : ActorModule
protected void OnDeath()
{
_actor.IsDestroyed = true;
GD.Print("Actor dead");
_actor.TriggerDeath();
}
}