LdtkEntityInstance
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
The LdtkData object this entity instance belongs to
The layer instance id of this entity instance.
When the whole world is not loaded entirely, it's
possible that this is defined but layerInstance isn't.
Grid-based X coordinate
Grid-based Y coordinate
Pixel X coordinate
Pixel Y coordinate
An array of all custom fields and their values.
Entity width in pixels. For non-resizable entities, it will be the same as Entity definition.
Entity height in pixels. For non-resizable entities, it will be the same as Entity definition.
Unique instance identifier
| Name | Type |
|---|---|
identifier |
String |
| Returns |
|---|
| Null<LdtkFieldInstance> |
| Returns |
|---|
| String |
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) |
Private Members
Metadata
| Name | Parameters |
|---|---|
:hxGen |
- |