public void QueueChunkNeighborUpdate(int x, int z, int radius, Chunk.ChunkState state) { for (int i = x - radius; i < x + radius; i++) { for (int k = z - radius; k < z + radius; k++) { QueueChunkUpdate(i, k, state); } } }
public void QueueChunkUpdate(int x, int z, Chunk.ChunkState state) { // Debug.Log($"queue update: {x}, {z}"); Chunk chunk; if ((chunk = terrain.GetChunk(x, z)) != null) { chunk.chunkState = state; dirtyChunks.AddLast(new Vector2Int(x, z)); } }