Skip to content
Casey Baxter edited this page Oct 30, 2012 · 6 revisions

##Public ###Data TileSet.image (default: nil)
The Image of the TileSet.

TileSet.imagePath (default: nil)
The relative path to the image of the tileset. This is mainly used for saving. If you change the image be sure to set this to the image location if you intend to save the map.

TileSet.name (default: nil)
The name of the TileSet. TileSets are indexed by name in the Map.

TileSet.tileWidth (default: nil)
The width of tiles contained in the TileSet.

TileSet.tileHeight (default: nil)
The height of the tiles contained in the TileSet.

TileSet.width (default: nil)
The width of the TileSet Image in pixels.

TileSet.height (default: nil)
The height of the TileSet Image in pixels.

TileSet.firsgid (default: nil)
The starting gid.

TileSet.spacing (default: 0)
The spacing in pixels between each tile.

TileSet.margin (default: 0)
The margin in pixels surrounding the entire tile set.

TileSet.trans (default: nil) The transparency value for the tileset in HTML format (#FFFFFF). This is automatically applied when the map is loaded. Primarily used for saving.

TileSet.offsetX (default: 0)
The X offset.

TileSet.offsetY (default: 0)
The Y offset.

TileSet.tileProperties (default: {})
Properties of contained tiles indexed by the tile's gid. Copied to tiles when they are cut out of the tileset.

TileSet.properties (default: {})
The Tiled properties of the tileset.

TileSet.class (default: "TileSet")
The class name

###Functions TileSet.tilesWide()
Returns how many tiles wide the tileset would be given the current settings.

TileSet.tilesHigh()
Returns how many tiles high the tileset would be given the current settings.

TileSet.getTiles()
Produces tiles from the settings and returns them in a table indexed by their id. These are cut out left-to-right, top-to-bottom. This is used mainly internally.


###See Also Tile
TileLayer
Map
Home

Clone this wiki locally