public void Search(AStarFindHeuristic heuristic, int startx, int starty, int endx, int endy, bool flying, bool flag, AStarFinderListener callback) { AStarFinder pathfinderTask = new AStarFinder(heuristic, field, startx, starty, endx, endy, flying, flag, callback); AStarFinder existing = pathQueue.Contains(pathfinderTask); if (existing != null) { existing.Update(pathfinderTask); } else { pathQueue.Add(pathfinderTask); } pathfinderThread.Interrupt(); }
public AStarFinder(AStarFindHeuristic heuristic, Field2D field_0, int startX_1, int startY_2, int endX_3, int endY_4, bool flying_5, bool flag_6, AStarFinderListener callback) { this.field = field_0; this.startX = startX_1; this.startY = startY_2; this.endX = endX_3; this.endY = endY_4; this.flying = flying_5; this.flag = flag_6; this.pathFoundListener = callback; this.findHeuristic = heuristic; }
public void Search(AStarFindHeuristic heuristic, int startx, int starty, int endx, int endy, bool flying, AStarFinderListener callback) { Search(heuristic, startx, starty, endx, endy, flying, false, callback); }