GKGridGraph
A navigation graph for 2D game worlds where movement is constrained to an integer grid.
Declaration
class GKGridGraph<NodeType> where NodeType : GKGridGraphNodeOverview
Use this class to generate a graph containing GKGridGraphNode objects representing a specified grid. Then use methods of the superclass GKGraph to find routes through the graph.
To learn more about graphs and pathfinding, see Pathfinding in GameplayKit Programming Guide.
Topics
Creating a Graph
init(fromGridStartingAt:width:height:diagonalsAllowed:nodeClass:)init(fromGridStartingAt:width:height:diagonalsAllowed:)