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 DepthSearch(GridBaseAbstract <Coords> grid, Coords start, int radius) : base(grid) { mStart = start; mRadius = radius; mOpenList = new Queue <uint>(); mOpenList.Enqueue(start.index); }
public FindPath(GridBaseAbstract <Coords> grid, Coords start, Coords end, GridAgentAbstract <Coords> avatar) : base(grid, start, end) { mAgent = avatar; if (!IsNodeValidEndpoint(end)) { Finished = true; } }
public GetLineTo(GridBaseAbstract <Coords> grid, Coords start, Coords end) : base(grid) { mStart = start; mEnd = end; mOpenList = new LinkedList <openNode>(); mClosedList = new Dictionary <uint, openNode>(); Init(); }
public bool Init(GridBaseAbstract <Coords> grid, Coords pos) { mGrid = grid; cell = pos.index; if (Grid != null && cell != uint.MaxValue) { mId = Grid.NextAgentId; transform.SetParent(Grid.transform); transform.position = Grid.GetCellPos(pos); return(true); } return(false); }
public Search(GridBaseAbstract <Coords> grid) { mFinished = false; mGrid = grid; mResults = new List <uint>(); }
public void Init(GridBaseAbstract <Coords> grid, GridAgentBrain brain, Coords pos) { Init(grid, pos); SetBrain(brain); }