コード例 #1
0
    public static byte CalcShape(MeshShapeType meshShape, RotationType rotation, bool upsideDown)
    {
        var result = (byte)((byte)meshShape | (byte)rotation);

        if (upsideDown)
        {
            result |= UpsideDownFlag;
        }
        return(result);
    }
コード例 #2
0
 public Voxel ChangeShape(MeshShapeType meshShape, RotationType rotation, bool upsideDown)
 {
     return(new Voxel(meshShape, rotation, upsideDown, BlockType));
 }
コード例 #3
0
 public Voxel(MeshShapeType meshShape, ushort blockType)
 {
     ShapeData = CalcShape(meshShape, RotationType.North, false);
     BlockType = blockType;
 }
コード例 #4
0
 public Voxel(MeshShapeType meshShape, RotationType rotation, bool upsideDown, ushort blockType)
 {
     ShapeData = CalcShape(meshShape, rotation, upsideDown);
     BlockType = blockType;
 }