Contents

connectToAdjacentNodes(node:)

Adds the specified node to the graph, connecting it to its nearest neighbors in the grid.

Declaration

func connectToAdjacentNodes(node: GKGridGraphNode)

Parameters

  • node:

    A graph node object containing integer grid coordinate information.

Discussion

Nodes attached through this method do not become part of the grid itself, but instead can represent positions of game entities in the grid. Use nodes connected in this way to find paths between such positions.

See Also

Working with Nodes