rmp::MapObject
One object placed in the map, as spawn_objects() hands it to the factory registered for its type: where it is, how big, and its properties.
name
The Tiled object's name; "" for an LDtk entity
type
The LDtk entity; Tiled's class
iid
LDtk's unique id, what an EntityRef field holds
position
THE CENTRE, like rmp::Object; the editors give a corner
size
Width and height in world units; {0,0} for a Tiled point
rotation
Tiled's, in degrees clockwise; 0 for an LDtk entity
gid
0 when it is not a tile object
property_bool, property_int, property_float
A property by name — an LDtk field, a Tiled custom property — or fallback when the object has none by that name or it holds another kind. property_int() also reads a float, cut towards zero, and property_float() also reads an int.
property_string
The map's text, or fallback as it was given: its lifetime is yours.
property_point, property_count
An LDtk Point field, as the WORLD position of the centre of the cell it names — the same units as position, so a patrol route or a platform's destination is used as it comes. A list of them (Array<Point>) is read by index; property_count() is how many there are, and 1 for any other field that exists. Enums read as text, colours as "#rrggbb", and an EntityRef as the iid of the entity it points at.