toLayer static method
Implementation
static toLayer(MapLayer layer, int priority) {
return Layer(
id: layer.id,
layerClass: layer.layerClass,
name: layer.name,
opacity: layer.opacity ?? 1,
visible: layer.visible ?? true,
priority: priority,
position: Vector2(
layer.x ?? 0,
layer.y ?? 0,
),
offset: Vector2(
layer.offsetX ?? 0,
layer.offsetY ?? 0,
),
properties: extractOtherProperties(layer.properties),
tiles: [],
);
}