Examples of findPath()


Examples of transientlibs.slick2d.util.pathfinding.AStarPathFinder.findPath()

    public void updatePath() {
        map.pathfindingGoalX = goalX;
        map.pathfindingGoalY = goalY;
        AStarPathFinder pathFinder = new AStarPathFinder((TileBasedMap) map, 100, Detonator.INSTANCE.diagonalMovementAllowed);
        //Log.info("mapCoords.getIntX():"+mapCoords.getIntX()+"; mapCoords.getIntY()"+ mapCoords.getIntY() +"; goalX:"+goalX +"; goalY:"+ goalY);
        path = pathFinder.findPath(null, mapCoords.getIntX(), mapCoords.getIntY(),
                goalX, goalY);

        //Log.warn("Path size:"+path.getLength());
    }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.