LDtkLayerDefinition

@Serializable
data class LDtkLayerDefinition(val type: String, val autoRuleGroups: JsonArray, val autoSourceLayerDefUid: Int? = null, val autoTilesetDefUid: Int? = null, val displayOpacity: Float, val excludedTags: List<String>, val gridSize: Int, val identifier: String, val intGridValues: List<LDtkIntGridValueDefinition>, val pxOffsetX: Int, val pxOffsetY: Int, val requiredTags: List<String>, val tilePivotX: Float, val tilePivotY: Float, val tilesetDefUid: Int? = null, val layerDefinitionType: LDtkLayerType, val uid: Int, val parallaxFactorX: Float = 0.0f, val parallaxFactorY: Float = 0.0f, val parallaxScaling: Boolean = false)

Constructors

Link copied to clipboard
fun LDtkLayerDefinition(type: String, autoRuleGroups: JsonArray, autoSourceLayerDefUid: Int? = null, autoTilesetDefUid: Int? = null, displayOpacity: Float, excludedTags: List<String>, gridSize: Int, identifier: String, intGridValues: List<LDtkIntGridValueDefinition>, pxOffsetX: Int, pxOffsetY: Int, requiredTags: List<String>, tilePivotX: Float, tilePivotY: Float, tilesetDefUid: Int? = null, layerDefinitionType: LDtkLayerType, uid: Int, parallaxFactorX: Float = 0.0f, parallaxFactorY: Float = 0.0f, parallaxScaling: Boolean = false)

Properties

Link copied to clipboard
val autoRuleGroups: JsonArray

Contains all the auto-layer rule definitions.

Link copied to clipboard
Link copied to clipboard
val autoTilesetDefUid: Int? = null

Reference to the Tileset UID being used by this auto-layer rules

Link copied to clipboard

Opacity of the layer (0 to 1.0)

Link copied to clipboard

An array of tags to forbid some Entities in this layer

Link copied to clipboard

Width and height of the grid in pixels

Link copied to clipboard

Unique String identifier

Link copied to clipboard

A list that defines extra optional info for each IntGrid value.

Link copied to clipboard

Type of the layer as Haxe Enum Possible values: IntGrid, Entities, Tiles, AutoLayer

Link copied to clipboard

Parallax horizontal factor (from -1 to 1, defaults to 0) which affects the scrolling speed of this layer, creating a fake 3D (parallax) effect.

Link copied to clipboard

Parallax vertical factor (from -1 to 1, defaults to 0) which affects the scrolling speed of this layer, creating a fake 3D (parallax) effect.

Link copied to clipboard

If true (default), a layer with a parallax factor will also be scaled up/down accordingly.

Link copied to clipboard

X offset of the layer, in pixels (IMPORTANT: this should be added to the LayerInstance optional offset)

Link copied to clipboard

Y offset of the layer, in pixels (IMPORTANT: this should be added to the LayerInstance optional offset)

Link copied to clipboard

An array of tags to filter Entities that can be added to this layer

Link copied to clipboard

If the tiles are smaller or larger than the layer grid, the pivot value will be used to position the tile relatively its grid cell.

Link copied to clipboard

If the tiles are smaller or larger than the layer grid, the pivot value will be used to position the tile relatively its grid cell.

Link copied to clipboard
val tilesetDefUid: Int? = null

Reference to the Tileset UID being used by this Tile layer

Link copied to clipboard

Type of the layer (IntGrid, Entities, Tiles or AutoLayer)

Link copied to clipboard
val uid: Int

Unique Int identifier