public FindReachableNodes(GridBaseAbstract <Coords> grid, Coords start, int radius, GridAgentAbstract <Coords> avatar) : base(grid, start, radius) { mAgent = avatar; mOpenNodes = new Dictionary <uint, int>(); mResultNodes = new Dictionary <uint, int>(); mOpenNodes[start.index] = 0; }
public FindPath(GridBaseAbstract <Coords> grid, Coords start, Coords end, GridAgentAbstract <Coords> avatar) : base(grid, start, end) { mAgent = avatar; if (!IsNodeValidEndpoint(end)) { Finished = true; } }
// finds a path that is traversible by the given avatar public List <uint> FindPathTo(Coords start, Coords end, GridAgentAbstract <Coords> avatar) { List <uint> path = new List <uint>(); FindPath <Coords> search = new FindPath <Coords>(this, start, end, avatar); search.RunToEnd(); search.GetResults(out path); return(path); }
public Dictionary <uint, int> GetNodesInReachableRange(Coords start, GridAgentAbstract <Coords> avatar, int radius) { Dictionary <uint, int> nodes = new Dictionary <uint, int>(); DepthSearch <Coords> search = new DepthSearch <Coords>(this, start, radius); search.RunToEnd(); List <uint> results; search.GetResults(out results); return(nodes); }