Esempio n. 1
0
 private void chunkLoader_ChunkLoaded(Chunk chunk)
 {
     lock (_chunks) {
         if (chunkIsChild(chunk.X, chunk.Z))
         {
             _chunks[chunk.X % 16, chunk.Z % 16] = chunk;
         }
     }
 }
Esempio n. 2
0
 private void registerChunkForLoad(int x, int y, bool urgent)
 {
     Chunk chunk = new Chunk(x, y);
     lock (_queriedChunks) {
         if (urgent) {
             _queriedChunks.AddFirst(chunk);
         } else {
             _queriedChunks.AddLast(chunk);
         }
         Monitor.Pulse(_queriedChunks);
     }
 }