コード例 #1
0
        public Chunk(Int3 position, World world, InitOption option = InitOption.Build)
        {
            Position = position;
            World    = world;
            switch (option)
            {
            case InitOption.Build:
                Build(world.DaylightBrightness);
                break;

            case InitOption.AllocateUnique:
                EnableFullArray();
                break;

            default:
                EnableCopyOnWrite(StaticChunkPool.GetAirChunk());
                break;
            }
        }
コード例 #2
0
 internal void EnableCopyOnWrite(uint other)
 {
     Blocks      = StaticChunkPool.GetChunk(other).Blocks;
     CopyOnWrite = other;
 }