Pathfinding.PathHandler.PushNode C# (CSharp) Method

PushNode() public method

public PushNode ( PathNode node ) : void
node PathNode
return void
		public void PushNode (PathNode node) {
			heap.Add(node);
		}

Usage Example

コード例 #1
0
        public override void UpdateRecursiveG(Path path, PathNode pathNode, PathHandler handler)
        {
            GridGraph gridGraph = GridNode.GetGridGraph(base.GraphIndex);

            int[]      neighbourOffsets = gridGraph.neighbourOffsets;
            GridNode[] nodes            = gridGraph.nodes;
            base.UpdateG(path, pathNode);
            handler.PushNode(pathNode);
            ushort pathID = handler.PathID;

            for (int i = 0; i < 8; i++)
            {
                if (this.GetConnectionInternal(i))
                {
                    GridNode gridNode  = nodes[this.nodeInGridIndex + neighbourOffsets[i]];
                    PathNode pathNode2 = handler.GetPathNode(gridNode);
                    if (pathNode2.parent == pathNode && pathNode2.pathID == pathID)
                    {
                        gridNode.UpdateRecursiveG(path, pathNode2, handler);
                    }
                }
            }
            if (this.connections != null)
            {
                for (int j = 0; j < this.connections.Length; j++)
                {
                    GraphNode graphNode = this.connections[j];
                    PathNode  pathNode3 = handler.GetPathNode(graphNode);
                    if (pathNode3.parent == pathNode && pathNode3.pathID == pathID)
                    {
                        graphNode.UpdateRecursiveG(path, pathNode3, handler);
                    }
                }
            }
        }
All Usage Examples Of Pathfinding.PathHandler::PushNode