Пример #1
0
        public override Chunk DoBuild(Chunk chunk)
        {
            try
            {
                if ((chunk != null) && (chunk.State == ChunkState.AwaitingBuild))
                {
                    // Propogate the chunk lighting
                    chunk.State = ChunkState.Lighting;
                    _lightingChunkProcessor.ProcessChunk(chunk);

                    chunk.State = ChunkState.Building;
                    _vertexBuildChunkProcessor.ProcessChunk(chunk);

                    chunk.State = ChunkState.Ready;
                    //chunk.built = true;
                }
                return(chunk);
            }
            catch (Exception e)
            {
                //Debug.WriteLine("DoBuild Exception {0}", e);
                Debug.WriteLine("DoBuild Exception Chunk = {0},{1} - State = {2}", chunk.Position.X, chunk.Position.Z, chunk.State);
                throw e;
            }
        }
Пример #2
0
 public override Chunk DoBuild(Chunk chunk)
 {
     // Propogate the chunk lighting
     _lightingChunkProcessor.ProcessChunk(chunk);
     _vertexBuildChunkProcessor.ProcessChunk(chunk);
     //chunk.built = true;
     chunk.State = ChunkState.Ready;
     return(chunk);
 }
Пример #3
0
 private Chunk DoBuild(Chunk chunk)
 {
     lock (this)
     {
         //Debug.WriteLine("DoBuild " + chunk);
         if (chunk == null)
         {
             return(null);
         }
         if (chunk.State == ChunkState.AwaitingBuild || chunk.State == ChunkState.AwaitingRebuild)
         {
             chunk.State = ChunkState.Building;
             _vertexBuildChunkProcessor.ProcessChunk(chunk);
             chunk.State = ChunkState.Ready;
         }
         return(chunk);
     }
 }
 private Chunk DoBuild(Chunk chunk)
 {
     _vertexBuildChunkProcessor.ProcessChunk(chunk);
     return(chunk);
 }