This commit is contained in:
parent
901206c108
commit
bdb12e2000
1 changed files with 1 additions and 0 deletions
|
|
@ -27,6 +27,7 @@ public class AStar{
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<AStarNode> startSearch(Vector2i start, Vector2i goal){
|
public List<AStarNode> startSearch(Vector2i start, Vector2i goal){
|
||||||
|
map[goal.getX()][goal.getY()].setBlocked(false);
|
||||||
return pathfinder.findPath(map[start.getX()][start.getY()], map[goal.getX()][goal.getY()]);
|
return pathfinder.findPath(map[start.getX()][start.getY()], map[goal.getX()][goal.getY()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue