mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-08 23:05:53 +00:00
Damage actor handler
This commit is contained in:
parent
335f4d5430
commit
4fd31d7988
7 changed files with 100 additions and 4 deletions
|
|
@ -19,6 +19,8 @@ public partial class EnemyNavigationMovement : MovementHandler
|
|||
set => _parent.MovementDirection = value;
|
||||
}
|
||||
|
||||
public bool IsDestroyed => _parent.IsDestroyed;
|
||||
|
||||
[Export] private bool _navigationEnabled = false;
|
||||
|
||||
[Export] public float AlarmReactRange = 200f;
|
||||
|
|
@ -83,6 +85,7 @@ public partial class EnemyNavigationMovement : MovementHandler
|
|||
|
||||
public override void PhysicsUpdate(double delta)
|
||||
{
|
||||
if (IsDestroyed) return;
|
||||
if (_actorAi.Ai is not AiState.Enabled)
|
||||
return;
|
||||
|
||||
|
|
@ -149,7 +152,6 @@ public partial class EnemyNavigationMovement : MovementHandler
|
|||
Shoot();
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue