コード例 #1
0
 public VoxelState(VoxelState voxel, ChunkData chunk)
 {
     blockID   = voxel.blockID;
     position  = voxel.position;
     neighbors = new VoxelNeighbors(this);
     chunkData = chunk;
     light     = 0;
 }
コード例 #2
0
    /* public byte lightLevel {
     *      get { return (byte) Mathf.Round(globalLightPercent * (float) VoxelData.lightLevels); }
     * } */

    public VoxelState(byte id, ChunkData chunk, Vector4Int pos)
    {
        blockID   = id;
        position  = pos;
        neighbors = new VoxelNeighbors(this);
        chunkData = chunk;
        light     = 0;
    }