mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-10 11:35:54 +00:00
Damage actor handler
This commit is contained in:
parent
335f4d5430
commit
4fd31d7988
7 changed files with 100 additions and 4 deletions
|
|
@ -4,7 +4,7 @@ public partial class EnemyPossessionMovement : ActorFreeMovement
|
|||
{
|
||||
|
||||
private ActorAi _actorAi;
|
||||
|
||||
public bool IsDestroyed => _parent.IsDestroyed;
|
||||
// State accessor
|
||||
|
||||
public override void Init(Actor parent)
|
||||
|
|
@ -16,6 +16,7 @@ public partial class EnemyPossessionMovement : ActorFreeMovement
|
|||
|
||||
public override void PhysicsUpdate(double delta)
|
||||
{
|
||||
if (IsDestroyed) return;
|
||||
if (_actorAi.Ai is AiState.Controlled)
|
||||
base.PhysicsUpdate(delta);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue