Damage actor handler

This commit is contained in:
Marco 2025-02-23 18:08:57 +01:00
commit 4fd31d7988
7 changed files with 100 additions and 4 deletions

View file

@ -16,6 +16,8 @@ public partial class ActorFreeMovement : MovementHandler
get => _parent.MovementDirection;
set => _parent.MovementDirection = value;
}
public bool IsDestroyed => _parent.IsDestroyed;
public override void Init(Actor parent)
{
@ -32,6 +34,8 @@ public partial class ActorFreeMovement : MovementHandler
public override void PhysicsUpdate(double delta)
{
if (IsDestroyed) return;
MovementDirection = AggregateInputProviders().Normalized();
var aimingDirection = GetAimingDirection().Normalized();