GetNode() public method

public GetNode ( int i ) : PathNode
i int
return PathNode
示例#1
0
        protected void RebuildOpenList()
        {
            BinaryHeapM heap = base.pathHandler.GetHeap();

            for (int i = 0; i < heap.numberOfItems; i++)
            {
                PathNode node = heap.GetNode(i);
                node.H = base.CalculateHScore(node.node);
                heap.SetF(i, node.F);
            }
            base.pathHandler.RebuildHeap();
        }
        protected void RebuildOpenList()
        {
            BinaryHeapM heap = pathHandler.GetHeap();

            for (int j = 1; j < heap.numberOfItems; j++)
            {
                PathNode nodeR = heap.GetNode(j);
                nodeR.H = this.CalculateHScore(nodeR.node);
            }

            pathHandler.RebuildHeap();
        }