private GridTileLookupChunk GetOrCreateChunk(GridId gridId, Vector2i indices) { var chunkIndices = GetChunkIndices(indices); if (!_graph.TryGetValue(gridId, out var gridChunks)) { gridChunks = new Dictionary <Vector2i, GridTileLookupChunk>(); _graph[gridId] = gridChunks; } if (!gridChunks.TryGetValue(chunkIndices, out var chunk)) { chunk = new GridTileLookupChunk(gridId, chunkIndices); gridChunks[chunkIndices] = chunk; } return(chunk); }
internal GridTileLookupNode(GridTileLookupChunk parentChunk, Vector2i indices) { ParentChunk = parentChunk; Indices = indices; }
internal GridTileLookupNode(GridTileLookupChunk parentChunk, MapIndices indices) { ParentChunk = parentChunk; Indices = indices; }