Exemplo n.º 1
0
 public WorkerQueue(uint workerCount, VoxelWorld world)
 {
     _world         = world;
     _updateThreads = new Thread[workerCount];
     for (var i = 0; i < workerCount; i++)
     {
         _updateThreads[i] = new Thread(work);
     }
 }
 public void PerformAction(VoxelWorld world)
 {
     if (_chunk != null)
     {
         world.Generator.GenerateChunk(_chunk, world);
     }
     else
     {
         world.Generator.GenerateChunk(_pos, world);
     }
 }