Pathfinder IsMoving, Stop
This commit is contained in:
@@ -42,6 +42,14 @@ namespace DepthsBelow.Component
|
||||
this.FindPath(this.Parent.GetComponent<Transform>().Grid.Position, value, null);
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsMoving
|
||||
{
|
||||
get
|
||||
{
|
||||
return path != null && path.Count() != 0;
|
||||
}
|
||||
}
|
||||
|
||||
private AStar.PathFinderFast pathFinder;
|
||||
private List<AStar.PathFinderNode> path;
|
||||
@@ -79,6 +87,11 @@ namespace DepthsBelow.Component
|
||||
return (Node)nextNode;
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
path = null;
|
||||
}
|
||||
|
||||
private List<AStar.PathFinderNode> FindPath(Point start, Point goal, List<Point> appendCollisionMap)
|
||||
{
|
||||
byte[,] mapCollisionMap = Core.Map.GetCollisionMap();
|
||||
|
||||
Reference in New Issue
Block a user