LdtkEntityDefinition
Defines an entity type that can be placed in levels.
Entities are game objects like players, enemies, items, triggers, etc. This definition describes the entity's appearance, fields, and behavior rules.
Instance Members
The LdtkDefinitions
object this entity def belongs to
Base entity color
Pixel width
Pixel height
User defined unique identifier
An array of 4 dimensions for the up/right/down/left borders (in this order) when using 9-slice mode for tileRenderMode
.
If the tileRenderMode is not NineSlice, then this array is empty.
Pivot X coordinate (from 0 to 1.0)
Pivot Y coordinate (from 0 to 1.0)
Render mode
An object representing a rectangle from an existing Tileset (can be null
)
An enum describing how the the Entity tile is rendered inside the Entity bounds.
The corresponding Tileset definition, if any, for optional tile display
Unique Int identifier
An array of strings that classifies this entity
An array of field definitions that belong to this entity definition
Returns true
if entities instances having this entity definition
can be rendered with the given renderMode
. Will also check that
the definition is not using internal icons as well, as they should not be rendered anyway.
Name | Type | Description |
---|---|---|
renderMode |
LdtkRenderMode | The render mode we want to test |
Returns | Description |
---|---|
Bool | Bool |
Returns |
---|
String |
Name | Type |
---|---|
identifier |
String |
Returns |
---|
LdtkFieldDefinition |
Name | Type | Default |
---|---|---|
defs |
LdtkDefinitions | (optional) |
json |
haxe.DynamicAccess<Dynamic> | (optional) |