Search in sources :

Example 1 with PathBuilder

use of eidolons.game.battlecraft.ai.tools.path.PathBuilder in project Eidolons by IDemiurge.

the class DC_MovementManager method buildPath.

public List<ActionPath> buildPath(Unit unit, Coordinates coordinates) {
    List<DC_ActiveObj> moves = getMoves(unit);
    PathBuilder builder = PathBuilder.getInstance().init(moves, new Action(unit.getAction("Move")));
    List<ActionPath> paths = builder.build(new ListMaster<Coordinates>().getList(coordinates));
    if (paths.isEmpty()) {
        return null;
    }
    return paths;
}
Also used : PathBuilder(eidolons.game.battlecraft.ai.tools.path.PathBuilder) Action(eidolons.game.battlecraft.ai.elements.actions.Action) DC_UnitAction(eidolons.entity.active.DC_UnitAction) ActionPath(eidolons.game.battlecraft.ai.tools.path.ActionPath) ListMaster(main.system.auxiliary.data.ListMaster) DC_ActiveObj(eidolons.entity.active.DC_ActiveObj)

Aggregations

DC_ActiveObj (eidolons.entity.active.DC_ActiveObj)1 DC_UnitAction (eidolons.entity.active.DC_UnitAction)1 Action (eidolons.game.battlecraft.ai.elements.actions.Action)1 ActionPath (eidolons.game.battlecraft.ai.tools.path.ActionPath)1 PathBuilder (eidolons.game.battlecraft.ai.tools.path.PathBuilder)1 ListMaster (main.system.auxiliary.data.ListMaster)1