internal void clear() { _grid = null; _startNode = null; _endNode = null; _binaryHeaps.Dispose(); _path = null; }
void Awake() { if (_grid == null) { _grid = GetComponent <AStarGrid>(); } _requestManager = GetComponent <PathRequestManager>(); }
internal bool findPath(AStarGrid grid) { if (_grid != null) { clear(); } _grid = grid; _startNode = _grid.startNode; _endNode = _grid.endNode; _startNode._g = 0; _startNode._h = _heuristic(_startNode, _endNode); _startNode._f = _startNode._g + _startNode._h; return(search()); }