diff --git a/DepthsBelow/DepthsBelow/Component/PathFinder.cs b/DepthsBelow/DepthsBelow/Component/PathFinder.cs index 4dad9d7..42309c0 100755 --- a/DepthsBelow/DepthsBelow/Component/PathFinder.cs +++ b/DepthsBelow/DepthsBelow/Component/PathFinder.cs @@ -42,6 +42,14 @@ namespace DepthsBelow.Component this.FindPath(this.Parent.GetComponent().Grid.Position, value, null); } } + + public bool IsMoving + { + get + { + return path != null && path.Count() != 0; + } + } private AStar.PathFinderFast pathFinder; private List path; @@ -79,6 +87,11 @@ namespace DepthsBelow.Component return (Node)nextNode; } + public void Stop() + { + path = null; + } + private List FindPath(Point start, Point goal, List appendCollisionMap) { byte[,] mapCollisionMap = Core.Map.GetCollisionMap();