Пример #1
0
 public LazyChunkData(Vector3Int ID, Vector3Int chunkDimensions, VoxelTypeID[] initialData = null) : base(ID, chunkDimensions, initialData)
 {
     if (initialData != null)
     {
         storage = new StorageImplementation();
         storage.InitialiseWithData(chunkDimensions, initialData);
     }
     else
     {
         storage = new LazyStorageImplementation <LazyChunkData <StorageImplementation>, VoxelTypeID>(this);
     }
 }
Пример #2
0
 public LightChunkData(Vector3Int dimensions, LightValue[] initialData = null)
 {
     Dimensions = dimensions;
     if (initialData != null)
     {
         storage = new FlatArrayStorage <LightValue>();
         storage.InitialiseWithData(dimensions, initialData);
     }
     else
     {
         //Lazy storage implementation for reduce memory usage
         storage = new LazyStorageImplementation <LightChunkData, LightValue>(this);
     }
 }
Пример #3
0
 public void InitialiseEmptyStorage()
 {
     storage = new FlatArrayStorage <LightValue>();
     storage.InitialiseEmpty(Dimensions);
 }
Пример #4
0
 public void InitialiseEmptyStorage()
 {
     storage = new StorageImplementation();
     storage.InitialiseEmpty(Dimensions);
 }