TmxMap
General .tmx map file
Instance Members
version: String
The TMX format version, generally 1.0.
tiledVersion: String
The Tiled version used to save the file (since Tiled 1.0.1). May be a date (for snapshot builds).
Map orientation.
width: Int
The map width in tiles.
height: Int
The map height in tiles.
tileWidth: Int
The width of a tile.
The tilewidth and tileheight properties determine the general grid size of the map. The individual tiles may have different sizes. Larger tiles will extend at the top and right (anchored to the bottom left).
tileHeight: Int
The height of a tile.
The tilewidth and tileheight properties determine the general grid size of the map. The individual tiles may have different sizes. Larger tiles will extend at the top and right (anchored to the bottom left).
backgroundColor: Int
The background color of the map. Since 0.9, optional.
The order in which tiles on tile layers are rendered. Since 0.10, but only for orthogonal orientation.
For staggered and hexagonal maps, determines whether the "even" or "odd" indexes along the staggered axis are shifted. Since 0.11
For staggered and hexagonal maps, determines which axis (x or y) is staggered. (since 0.11); Ex staggerDirection.
hexSideLength: Int
Only for hexagonal maps. Determines the width or height (depending on the staggered axis) of the tile's edge, in pixels. Since 0.11
nextObjectId: Int
Stores the next available ID for new objects. This number is stored to prevent reuse of the same ID after objects have been removed. (since 0.11)
nextLayerId: Int
Stores the next available ID for new layers. This number is stored to prevent reuse of the same ID after layers have been removed. (since 1.2)
properties: TmxProperties
Properties of the map
tilesets: Array<TmxTileset>
Tilesets used in map
layers: Array<Anonymous>
Array of all layers in map. Tile layers, object groups and image layers.
infinite: Bool
Is that map infinite?
Local path of the TmxMap supplied during parsing.
new(version: String, tiledVersion: String, orientation: Anonymous, width: Int, height: Int, tileWidth: Int, tileHeight: Int, ?backgroundColor: Int, ?renderOrder: Anonymous, ?staggerIndex: Anonymous, ?staggerAxis: Anonymous, ?hexSideLength: Int, ?nextObjectId: Int, ?nextLayerId: Int, ?properties: TmxProperties, tilesets: Array<TmxTileset>, layers: Array<Anonymous>, infinite: Bool, localPath: Null<String>): Void
Name | Type | Default | Description |
---|---|---|---|
version |
String | The TMX format version, generally 1.0. | |
tiledVersion |
String | The Tiled version used to save the file (since Tiled 1.0.1). May be a date (for snapshot builds). | |
orientation |
Anonymous | Map orientation. | |
width |
Int | The map width in tiles. | |
height |
Int | The map height in tiles. | |
tileWidth |
Int | * The width of a tile. * The tilewidth and tileheight properties determine the general grid size of the map. The individual tiles may have different sizes. Larger tiles will extend at the top and right (anchored to the bottom left). | |
tileHeight |
Int | * The height of a tile. * The tilewidth and tileheight properties determine the general grid size of the map. The individual tiles may have different sizes. Larger tiles will extend at the top and right (anchored to the bottom left). | |
backgroundColor |
Int | (optional) | The background color of the map. Since 0.9, optional. |
renderOrder |
Anonymous | (optional) | The order in which tiles on tile layers are rendered. Since 0.10, but only for orthogonal orientation. |
staggerIndex |
Anonymous | (optional) | For staggered and hexagonal maps, determines whether the "even" or "odd" indexes along the staggered axis are shifted. Since 0.11 |
staggerAxis |
Anonymous | (optional) | * For staggered and hexagonal maps, determines which axis (x or y) is staggered. (since 0.11); Ex staggerDirection. |
hexSideLength |
Int | (optional) | Only for hexagonal maps. Determines the width or height (depending on the staggered axis) of the tile's edge, in pixels. Since 0.11 |
nextObjectId |
Int | (optional) | Stores the next available ID for new objects. This number is stored to prevent reuse of the same ID after objects have been removed. (since 0.11) |
nextLayerId |
Int | (optional) | Stores the next available ID for new layers. This number is stored to prevent reuse of the same ID after layers have been removed. (since 1.2) |
properties |
TmxProperties | (optional) | Properties of the map |
tilesets |
Array<TmxTileset> | Tilesets used in map | |
layers |
Array |
Array of all layers in map. Tile layers, object groups and image layers. | |
infinite |
Bool | Is that map infinite? | |
localPath |
Null<String> | Local path of the TmxMap supplied during parsing. |
Metadata
Name | Parameters |
---|---|
:structInit |
- |