Package transientlibs.slick2d.util.pathfinding

Examples of transientlibs.slick2d.util.pathfinding.AStarPathFinder


     * Find path to coords goalX and goalY
     */
    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

Related Classes of transientlibs.slick2d.util.pathfinding.AStarPathFinder

Copyright © 2018 www.massapicom. 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.