Examples of AStarPathFinder


Examples of org.freerealm.map.AStarPathFinder

        NodeList nodeList = builder.getDocument().getElementsByTagName("WorldMap");
        Node worldMapNode = nodeList.item(0);
        WorldMap worldMap = new WorldMap();
        (new WorldMapXMLWrapper(worldMap)).initializeFromNode(realm, worldMapNode);
        realm.setWorldMap(worldMap);
        realm.setPathFinder(new AStarPathFinder(realm, 100));
        return new CommandResult(CommandResult.RESULT_OK, "");
    }
View Full Code Here

Examples of org.freerealm.map.AStarPathFinder

                }
            }
        }
        worldMap.setMapItems(mapItems);
        realm.setWorldMap(worldMap);
        realm.setPathFinder(new AStarPathFinder(realm, 100));
        return new CommandResult(CommandResult.RESULT_OK, "");
    }
View Full Code Here

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
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.