TmxBaseLayer

format.tmx.TmxBaseLayer (Class) → TmxImageLayer, TmxObjectGroup, TmxTileLayer

Instance Members

id: Int

Unique ID of the layer. Each layer that added to a map gets a unique id. Even if a layer is deleted, no layer ever gets the same ID. Can not be changed in Tiled. (since Tiled 1.2)


name: String

The name of the layer.


The x coordinate of the layer in tiles. Defaults to 0 and can no longer be changed in Tiled Qt. (Except ImageLayer)


The y coordinate of the layer in tiles. Defaults to 0 and can no longer be changed in Tiled Qt. (Except ImageLayer)


width: Null<Int>

The width of the layer in tiles. Traditionally required, but as of Tiled Qt always the same as the map width.


height: Null<Int>

The height of the layer in tiles. Traditionally required, but as of Tiled Qt always the same as the map height.


opacity: Null<Float>

The opacity of the layer as a value from 0 to 1. Defaults to 1.


visible: Null<Bool>

Whether the layer is shown (1) or hidden (0). Defaults to 1.


offsetX: Null<Int>

Rendering offset for this layer in pixels. Defaults to 0. (since 0.14)


offsetY: Null<Int>

Rendering offset for this layer in pixels. Defaults to 0. (since 0.14)


properties: TmxProperties

new(id: Int, name: String, x: Null<Float>, y: Null<Float>, offsetX: Null<Int>, offsetY: Null<Int>, width: Null<Int>, height: Null<Int>, opacity: Null<Float>, visible: Bool, properties: TmxProperties): Void
Name Type
id Int
name String
x Null<Float>
y Null<Float>
offsetX Null<Int>
offsetY Null<Int>
width Null<Int>
height Null<Int>
opacity Null<Float>
visible Bool
properties TmxProperties