LdtkEntityInstance

ceramic.LdtkEntityInstance (Class)

An instance of an entity placed in a level.

Contains the entity's position, size, field values, and tile information. This is the actual game object data as opposed to the entity definition.

Instance Members

The related entity definition


ldtk
layerInstance: LdtkLayerInstance

The layer instance this entity instance belongs to


ldtk
gridX: Int

Grid-based X coordinate


ldtk
gridY: Int

Grid-based Y coordinate


ldtk
pxX: Int

Pixel X coordinate


ldtk
pxY: Int

Pixel Y coordinate


ldtk
fieldInstances: Array<LdtkFieldInstance>

An array of all custom fields and their values.


ldtk
width: Int

Entity width in pixels. For non-resizable entities, it will be the same as Entity definition.


ldtk
height: Int

Entity height in pixels. For non-resizable entities, it will be the same as Entity definition.


ldtk
iid: String

Unique instance identifier


ldtk
fieldInstance(identifier: String): Null<LdtkFieldInstance>
Name Type
identifier String
Returns
Null<LdtkFieldInstance>

ldtk
toString(): String
Returns
String

ldtk
new(?ldtkData: LdtkData, ?ldtkWorld: LdtkWorld, ?json: haxe.DynamicAccess<Dynamic>, ?register: Function): Void
Name Type Default
ldtkData LdtkData (optional)
ldtkWorld LdtkWorld (optional)
json haxe.DynamicAccess<Dynamic> (optional)
register Function (optional)