Пример #1
0
 public static void precomputeWaypoints(MapLocation start) {
   if (!Pathfinder.isStarted()) Pathfinder.startComputation(start);
   else if (!Pathfinder.isDone()) Pathfinder.continueComputation();
 }
Пример #2
0
 public static MapLocation[] findWaypoints(MapLocation start, MapLocation target) {
   if (!Pathfinder.isStarted()) Pathfinder.startComputation(start);
   else if (!Pathfinder.isDone()) Pathfinder.continueComputation();
   else return Pathfinder.findWaypoints(target);
   return null;
 }