AStarPathfinder.CellsFromPath C# (CSharp) Méthode

CellsFromPath() public méthode

public CellsFromPath ( ) : List
Résultat List
    public List<Cell> CellsFromPath()
    {
        List<Cell> path = FinalPath.Select(n => n.Cell).ToList();
        if (path.Count == 0) return path;
        path.Reverse();
        path.RemoveAt(0);
        return path;
    }

Same methods

AStarPathfinder::CellsFromPath ( int size ) : List

Usage Example

Exemple #1
0
    public static List <Cell> PathToTarget(this GameMap gm, Cell origin, Cell goal)
    {
        var pathFinder = new AStarPathfinder();

        pathFinder.FindPath(origin, goal, gm.CellGameMap, false);
        return(pathFinder.CellsFromPath());
    }
All Usage Examples Of AStarPathfinder::CellsFromPath