Package mindustry.ai

Class ControlPathfinder

java.lang.Object
mindustry.ai.ControlPathfinder

public class ControlPathfinder extends Object
  • Field Details

  • Constructor Details

    • ControlPathfinder

      public ControlPathfinder()
  • Method Details

    • nextTargetId

      public int nextTargetId()
      Returns:
      the next target ID to use as a unique path identifier.
    • getPathPosition

      public boolean getPathPosition(mindustry.gen.Unit unit, int pathId, Vec2 destination, Vec2 out)
      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.