TmxObject
Instance Members
id: IntId of the object. Each object that is placed on map gets unique id. And even if object was deleted no one gets it's id again. Can not be changed in Tiled Qt.
name: StringThe name of the object. An arbitrary string.
type: StringThe type of the object. An arbitrary string.
x: FloatThe x coordinate of the object in pixels.
y: FloatThe y coordinate of the object in pixels.
width: FloatThe width of the object in pixels (defaults to 0).
height: FloatThe height of the object in pixels (defaults to 0).
rotation: FloatThe rotation of the object in degrees clockwise (defaults to 0). (Since 0.10)
visible: BoolWhether the object is shown (1) or hidden (0). Defaults to 1. (since 0.9.0)
Helper type to easily detect what exactly is that object.
properties: TmxPropertiesObject properties.
flippedHorizontally: BoolIs tile flipped horizontally? Default: false
flippedVertically: BoolIs tile flipped vertically? Default: false
template: StringA reference to a template file (optional).
new(id: Int, ?name: String, ?type: String, x: Float, y: Float, ?width: Float, ?height: Float, ?rotation: Float, ?visible: Bool, objectType: Anonymous, ?properties: TmxProperties, ?flippedHorizontally: Bool, ?flippedVertically: Bool, ?template: String): Void| Name | Type | Default | Description |
|---|---|---|---|
id |
Int | Id of the object. Each object that is placed on map gets unique id. And even if object was deleted no one gets it's id again. Can not be changed in Tiled Qt. | |
name |
String | (optional) | The name of the object. An arbitrary string. |
type |
String | (optional) | The type of the object. An arbitrary string. |
x |
Float | The x coordinate of the object in pixels. | |
y |
Float | The y coordinate of the object in pixels. | |
width |
Float | (optional) | The width of the object in pixels (defaults to 0). |
height |
Float | (optional) | The height of the object in pixels (defaults to 0). |
rotation |
Float | (optional) | The rotation of the object in degrees clockwise (defaults to 0). (Since 0.10) |
visible |
Bool | (optional) | Whether the object is shown (1) or hidden (0). Defaults to 1. (since 0.9.0) |
objectType |
Anonymous | Helper type to easily detect what exactly is that object. | |
properties |
TmxProperties | (optional) | Object properties. |
flippedHorizontally |
Bool | (optional) | Is tile flipped horizontally? Default: false |
flippedVertically |
Bool | (optional) | Is tile flipped vertically? Default: false |
template |
String | (optional) | A reference to a template file (optional). |
Metadata
| Name | Parameters |
|---|---|
:structInit |
- |