// External public Chunk GenerateChunk(Vector2DI inChunkPos) { Chunk.Data newChunkData = _chunkDataGenerator.Generate(inChunkPos); Chunk newChunk = new Chunk(newChunkData, _world); return(newChunk); }
// Exposed public Chunk.Data Generate(Vector2DI inChunkPos) { Chunk.Data newChunkData = new Chunk.Data(inChunkPos); NoiseGenerator.Output chunkNoiseData = _noiseGenerator.Generate(inChunkPos); TileMapGenerator.Output chunkTileMapData = _tileMapGenerator.Generate(inChunkPos, chunkNoiseData); newChunkData.SetTiles(chunkTileMapData.tiles); return(newChunkData); }