Package mindustry.ai

Class ControlPathfinder

java.lang.Object
mindustry.ai.ControlPathfinder
All Implemented Interfaces:
Runnable

public class ControlPathfinder extends Object implements Runnable
  • Field Details

  • Constructor Details

    • ControlPathfinder

      public ControlPathfinder()
  • Method Details

    • updateTile

      public void updateTile(Tile tile)
    • updateSingleTile

      public void updateSingleTile(Tile t)
    • isNearObstacle

      public static boolean isNearObstacle(mindustry.gen.Unit unit, int x1, int y1, int x2, int y2)
    • getPathPosition

      public boolean getPathPosition(mindustry.gen.Unit unit, arc.math.geom.Vec2 destination, arc.math.geom.Vec2 out, @Nullable boolean[] noResultFound)
    • getPathPosition

      public boolean getPathPosition(mindustry.gen.Unit unit, arc.math.geom.Vec2 destination, arc.math.geom.Vec2 mainDestination, arc.math.geom.Vec2 out, @Nullable boolean[] noResultFound)
    • raycastFast

      public static int raycastFast(int team, Pathfinder.PathCost type, int x1, int y1, int x2, int y2)
      Returns:
      0 if nothing was hit, otherwise the packed coordinates. This is an internal function and will likely be moved - do not use!
    • raycastFastAvoid

      public static int raycastFastAvoid(int team, Pathfinder.PathCost type, int x1, int y1, int x2, int y2)
      Returns:
      0 if nothing was hit, otherwise the packed coordinates. This is an internal function and will likely be moved - do not use!
    • run

      public void run()
      Specified by:
      run in interface Runnable