mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-08 20:15:55 +00:00
Enemy strafing
This commit is contained in:
parent
a18dc11eb3
commit
b35772f519
6 changed files with 112 additions and 16 deletions
|
|
@ -66,4 +66,15 @@ public partial class NavigationMovementModule : Node2D
|
|||
StorageModule.FacingDirection = _characterBody.Velocity.Normalized();
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsNavigable(Vector2 newPos)
|
||||
{
|
||||
_navigationAgent.SetTargetPosition(newPos);
|
||||
return _navigationAgent.IsTargetReachable();
|
||||
}
|
||||
|
||||
public bool IsNavigationFinished()
|
||||
{
|
||||
return _navigationAgent.IsNavigationFinished();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue