Finetuning walking between obstacles
This commit is contained in:
@ -4,18 +4,20 @@ import org.dreambot.api.methods.interactive.GameObjects;
|
||||
import org.dreambot.api.methods.interactive.Players;
|
||||
import org.dreambot.api.methods.map.Area;
|
||||
import org.dreambot.api.methods.map.Tile;
|
||||
import org.dreambot.api.methods.walking.path.impl.LocalPath;
|
||||
import org.dreambot.api.wrappers.interactive.GameObject;
|
||||
|
||||
public class Obstacle {
|
||||
private final int id;
|
||||
private final Area area;
|
||||
private final Tile[] walkingTiles;
|
||||
private final LocalPath<Tile> path;
|
||||
private Obstacle next;
|
||||
|
||||
public Obstacle(int id, Area area, Tile... walkingTiles) {
|
||||
this.id = id;
|
||||
this.area = area;
|
||||
this.walkingTiles = walkingTiles;
|
||||
path = new LocalPath<>();
|
||||
path.addAll(walkingTiles);
|
||||
}
|
||||
|
||||
public int getID() {
|
||||
@ -38,7 +40,7 @@ public class Obstacle {
|
||||
return area.contains(Players.localPlayer());
|
||||
}
|
||||
|
||||
public Tile[] getWalkingTiles() {
|
||||
return walkingTiles;
|
||||
public LocalPath<Tile> getPath() {
|
||||
return path;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user