예제 #1
0
 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);
         }
     }
 }
예제 #2
0
    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));
        }
    }