public static void precomputeWaypoints(MapLocation start) { if (!Pathfinder.isStarted()) Pathfinder.startComputation(start); else if (!Pathfinder.isDone()) Pathfinder.continueComputation(); }
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; }