LDtkLayerInstance

@Serializable
data class LDtkLayerInstance(val cHei: Int, val cWid: Int, val gridSize: Int, val identifier: String, val opacity: Float, val pxTotalOffsetX: Int, val pxTotalOffsetY: Int, val tilesetDefUid: Int? = null, val tilesetRelPath: String? = null, val type: String, val autoLayerTiles: List<LDtkTileInstance>, val entityInstances: List<LDtkEntityInstance>, val gridTiles: List<LDtkTileInstance>, val intGrid: List<LDtkIntGridValueInstance>? = null, val intGridCSV: List<Int>?, val layerDefUid: Int, val levelID: Int, val overrideTilesetUid: Int? = null, val pxOffsetX: Int, val pxOffsetY: Int, val seed: Int, val visible: Boolean, val iid: String = "")

Constructors

Link copied to clipboard
fun LDtkLayerInstance(cHei: Int, cWid: Int, gridSize: Int, identifier: String, opacity: Float, pxTotalOffsetX: Int, pxTotalOffsetY: Int, tilesetDefUid: Int? = null, tilesetRelPath: String? = null, type: String, autoLayerTiles: List<LDtkTileInstance>, entityInstances: List<LDtkEntityInstance>, gridTiles: List<LDtkTileInstance>, intGrid: List<LDtkIntGridValueInstance>? = null, intGridCSV: List<Int>?, layerDefUid: Int, levelID: Int, overrideTilesetUid: Int? = null, pxOffsetX: Int, pxOffsetY: Int, seed: Int, visible: Boolean, iid: String = "")

Properties

Link copied to clipboard

An array containing all tiles generated by Auto-layer rules. The array is already sorted in display order (ie. 1st tile is beneath 2nd, which is beneath 3rd etc.).

Note: if multiple tiles are stacked in the same cell as the result of different rules, all tiles behind opaque ones will be discarded.

Link copied to clipboard
val cHei: Int

Grid-based height

Link copied to clipboard
val cWid: Int

Grid-based width

Link copied to clipboard
Link copied to clipboard

Grid size

Link copied to clipboard
Link copied to clipboard

Layer definition identifier

Link copied to clipboard
val iid: String

Unique instance id

Link copied to clipboard

WARNING: this deprecated value will be removed completely on version 0.9.0+ Replaced by: intGridCsv

Link copied to clipboard

A list of all values in the IntGrid layer, stored from left to right, and top to bottom (ie. first row from left to right, followed by second row, etc). 0 means "empty cell" and IntGrid values start at 1. This array size is __cWid x __cHei cells.

Link copied to clipboard

Reference the Layer definition UID

Link copied to clipboard

Reference to the UID of the level containing this layer instance

Link copied to clipboard

Layer opacity as Float 0-1

Link copied to clipboard
val overrideTilesetUid: Int? = null

This layer can use another tileset by overriding the tileset UID here.

Link copied to clipboard

X offset in pixels to render this layer, usually 0 (IMPORTANT: this should be added to the LayerDef optional offset, see __pxTotalOffsetX)

Link copied to clipboard

Y offset in pixels to render this layer, usually 0 (IMPORTANT: this should be added to the LayerDef optional offset, see __pxTotalOffsetY)

Link copied to clipboard

Total layer X pixel offset, including both instance and definition offsets.

Link copied to clipboard

Total layer Y pixel offset, including both instance and definition offsets.

Link copied to clipboard
val seed: Int

Random seed used for Auto-Layers rendering

Link copied to clipboard
val tilesetDefUid: Int? = null

The definition UID of corresponding Tileset, if any.

Link copied to clipboard
val tilesetRelPath: String? = null

The relative path to corresponding Tileset, if any.

Link copied to clipboard

Layer type (possible values: IntGrid, Entities, Tiles or AutoLayer)

Link copied to clipboard

Layer instance visibility