Package mindustry.ai
Class ControlPathfinder
java.lang.Object
mindustry.ai.ControlPathfinder
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Pathfinder.PathCost
static final Pathfinder.PathCost
static final Pathfinder.PathCost
static final Pathfinder.PathCost
static boolean
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
getPathPosition
(mindustry.gen.Unit unit, int pathId, Vec2 destination, Vec2 out) boolean
getPathPosition
(mindustry.gen.Unit unit, int pathId, Vec2 destination, Vec2 out, boolean[] noResultFound) int
-
Field Details
-
costGround
-
costHover
-
costLegs
-
showDebug
public static boolean showDebug
-
-
Constructor Details
-
ControlPathfinder
public ControlPathfinder()
-
-
Method Details
-
nextTargetId
public int nextTargetId()- Returns:
- the next target ID to use as a unique path identifier.
-
getPathPosition
- Parameters:
pathId
- a unique ID for this location query, which should change every time the 'destination' vector is modified.- Returns:
- whether a path is ready.
-
getPathPosition
public boolean getPathPosition(mindustry.gen.Unit unit, int pathId, Vec2 destination, Vec2 out, @Nullable boolean[] noResultFound) - Parameters:
pathId
- a unique ID for this location query, which should change every time the 'destination' vector is modified.noResultFound
- extra return value for storing whether no valid path to the destination exists (thanks java!)- Returns:
- whether a path is ready.
-