Beispiel #1
0
        public static Path FindPathToDestination(MapController map, Vector3 currentNodeIndex, Vector3 targetNodeIndex,
                                                 EPathfindingAlgorithm algorithm = EPathfindingAlgorithm.AStar)
        {
            var pathfinderToUse = _currentAlgorithms[algorithm];

            return(pathfinderToUse.FindPathToDestination(currentNodeIndex, targetNodeIndex));
        }
Beispiel #2
0
        public static Path FindPathToDestination(IJ currentNodeIndex, IJ targetNodeIndex,
                                                 EPathfindingAlgorithm algorithm = EPathfindingAlgorithm.AStar, bool optimised = true)
        {
            var pathfinderToUse = _currentAlgorithms [algorithm];

            return(pathfinderToUse.FindPathToDestination(currentNodeIndex, targetNodeIndex, optimised));
        }