예제 #1
0
 public static void DrawChunkBlocks(PlayerCamera camera, Chunk chunk)
 {
     foreach (KeyValuePair <Block, CubeMesh> pair in WorldMeshMap.GetChunkCubeMeshMap(chunk))
     {
         if (pair.Key.ShouldRender)
         {
             BlockObject.Mesh     = pair.Value;
             BlockObject.Texture  = TextureMap.GetTextureFromID(pair.Key.ID);
             BlockObject.Position = GridLatch.WTMGetWorldBlock(chunk.Location, pair.Key.Location);
             BlockObject.Draw(camera);
         }
     }
 }