Пример #1
0
        public void GenerateMesh(Chunk northChunk, Chunk southChunk,
                                 Chunk westChunk, Chunk eastChunk,
                                 Chunk aboveChunk, Chunk belowChunk)
        {
            if (chunkMeshCluster == null)
            {
                chunkMeshCluster = ChunkMeshClusterPool.Instance().GetChunkMeshCluster();
            }

            SetLoadState(ChunkLoadState.MeshCalculating);
            needsMeshUpdate = false;
            chunkMeshCluster.Setup(this);
            chunkMeshCluster.Generate(northChunk, southChunk, westChunk, eastChunk, aboveChunk, belowChunk);
        }
Пример #2
0
 public void ClearMeshObject()
 {
     ChunkMeshClusterPool.Instance().ReturnChunkMeshCluster(chunkMeshCluster);
     chunkMeshCluster = null;
 }