LDtkEntityDefinition

@Serializable
data class LDtkEntityDefinition(val color: String, val fieldDefs: List<LDtkFieldDefinition>, val fillOpacity: Float, val height: Int, val hollow: Boolean, val identifier: String, val keepAspectRatio: Boolean, val lineOpacity: Float, val maxCount: Int, val pivotX: Float, val pivotY: Float, val resizableX: Boolean, val resizableY: Boolean, val showName: Boolean, val tags: List<String>, val tileID: Int? = null, val tilesetID: Int? = null, val uid: Int, val width: Int, val tileRect: LDtkTileRect? = null)

Constructors

Link copied to clipboard
fun LDtkEntityDefinition(color: String, fieldDefs: List<LDtkFieldDefinition>, fillOpacity: Float, height: Int, hollow: Boolean, identifier: String, keepAspectRatio: Boolean, lineOpacity: Float, maxCount: Int, pivotX: Float, pivotY: Float, resizableX: Boolean, resizableY: Boolean, showName: Boolean, tags: List<String>, tileID: Int? = null, tilesetID: Int? = null, uid: Int, width: Int, tileRect: LDtkTileRect? = null)

Properties

Link copied to clipboard

Base entity color

Link copied to clipboard

Array of field definitions

Link copied to clipboard
Link copied to clipboard
val height: Int

Pixel height

Link copied to clipboard
Link copied to clipboard

Unique String identifier

Link copied to clipboard

Only applies to entities resizable on both X/Y. If TRUE, the entity instance width/height will keep the same aspect ratio as the definition.

Link copied to clipboard
Link copied to clipboard

Max instances count

Link copied to clipboard

Pivot X coordinate (from 0 to 1.0)

Link copied to clipboard

Pivot Y coordinate (from 0 to 1.0)

Link copied to clipboard

If TRUE, the entity instances will be resizable horizontally

Link copied to clipboard

If TRUE, the entity instances will be resizable vertically

Link copied to clipboard

Display entity name in editor

Link copied to clipboard

An array of strings that classifies this entity

Link copied to clipboard
val tileID: Int? = null

Tile ID used for optional tile display

Link copied to clipboard
val tileRect: LDtkTileRect? = null

An object representing a rectangle from an existing tileset

Link copied to clipboard
val tilesetID: Int? = null

Tileset ID used for optional tile display

Link copied to clipboard
val uid: Int

Unique Int identifier

Link copied to clipboard
val width: Int

Pixel width