示例#1
0
        private void Awake()
        {
            var worldTransform = transform;

            var volumeStackGameObject = new GameObject("VolumeStack");
            var chunkStackGameObject  = new GameObject("ChunkStack");
            var volumesStackTransform = volumeStackGameObject.transform;
            var chunkStackTransform   = chunkStackGameObject.transform;

            volumesStackTransform.SetParent(worldTransform);
            chunkStackTransform.SetParent(worldTransform);

            _volumeStack = new VoxelVolumeStack(4, volumesStackTransform);
            _chunkStack  = new VoxelChunkStack(32, chunkStackTransform);

            _voxelVolumeFactory = new VoxelVolumeFactory(_volumeStack, _chunkStack);
        }
示例#2
0
 public VoxelVolumeFactory(VoxelVolumeStack volumeStack, VoxelChunkStack chunkStack)
 {
     _volumeStack = volumeStack;
     _chunkStack  = chunkStack;
 }