Indicates whether this tile is animated.
The asset this object is part of, or null
.
This tile’s animation as an array of frames.
Height of the tile in pixels.
ID of this tile within its tileset.
File name of the tile image (when the tile is part of an image collection tileset).
The source rectangle (in pixels) for this tile.
This can be either a sub-rectangle of the tile image when the tile is part of an image collection tileset or the sub-rectangle of the tileset image.
This property can currently only be modified when the tile is part of an image collection. For tileset image based tiles, it is read-only.
The ObjectGroup associated with the tile in case collision shapes were defined. Returns null if no collision shapes were defined for this tile.
Probability that the tile gets chosen relative to other tiles.
Whether the object is read-only.
Size of the tile in pixels.
The tileset of the tile.
Type of the tile.
Width of the tile in pixels.
Returns all custom properties set on this object.
Modifications to the properties will not affect the original object. Does not include inherited values (see resolvedProperties).
Returns the value of the custom property with the given name, or
undefined
if no such property is set on the object. Does not
include inherited values (see resolvedProperty).
file
properties are returned as FilePath.
object
properties are returned as MapObject when possible,
or ObjectRef when the object could not be found.
Removes the custom property with the given name.
Returns all custom properties set on this object. Modifications to the properties will not affect the original object. Includes values inherited from object types, templates and tiles where applicable.
Returns the value of the custom property with the given name, or
undefined
if no such property is set. Includes values inherited
from object types, templates and tiles where applicable.
Sets the value of the custom property with the given name to the given color value.
The color is specified as a string "#RGB", "#RRGGBB" or "#AARRGGBB".
Sets the value of the custom property with the given name to the given color value.
The color is specified by its red, green, blue and alpha components. Each component takes a value from 0 to 255. When not provided, the alpha defaults to 255.
Sets the value of the custom property with the given name to the given float value.
This function is provided as alternative to setProperty, since
that function will set whole numbers as int
properties.
Sets the image of this tile.
Replaces all currently set custom properties with a new set of properties.
Generated using TypeDoc
A single tile in a tileset.