Module flower.tiled.Tileset
This class holds information about the tile set.
Info:
- Release: V3.0.0
- Author: Makoto
Functions
Tileset:init (tileMap) | The constructor. |
Tileset:loadData (data) | Load the tileset data. |
Tileset:saveData () | Save the tileset data. |
Tileset:loadTexture (filter) | Load the texture of the tile set that is specified. |
Tileset:hasTile (gid) | Returns the tile index of the specified gid. |
Tileset:getTileIndexByGid (gid) | Returns the tile index of the specified gid. |
Tileset:getTileIdByGid (gid) | Returns the tile id of the specified gid. |
Tileset:getTileSize () | Returns the size of the tile. |
Tileset:getTileById (id) | Returns the tile of the specified id.(0 <= id <= max) |
Tileset:getTileProperties (id) | Returns the tile property of the specified id.(0 <= id <= tileid max) |
Tileset:getTileProperty (id, key) | Returns the tile property of the specified id.(0 <= id <= tileid max) |
Functions
- Tileset:init (tileMap)
-
The constructor.
Parameters:
- tileMap TileMap
- Tileset:loadData (data)
-
Load the tileset data.
Parameters:
- data tileset data
- Tileset:saveData ()
-
Save the tileset data.
Returns:
-
tileset data
- Tileset:loadTexture (filter)
-
Load the texture of the tile set that is specified.
Parameters:
- filter texture filter
Returns:
-
texture
- Tileset:hasTile (gid)
-
Returns the tile index of the specified gid.
Parameters:
- gid gid.
Returns:
-
If has gid return true.
- Tileset:getTileIndexByGid (gid)
-
Returns the tile index of the specified gid.
Parameters:
- gid gid.
Returns:
-
tile index.
- Tileset:getTileIdByGid (gid)
-
Returns the tile id of the specified gid.
Parameters:
- gid gid.
Returns:
-
tile id.
- Tileset:getTileSize ()
-
Returns the size of the tile.
Returns:
-
tile size.
- Tileset:getTileById (id)
-
Returns the tile of the specified id.(0 <= id <= max)
Parameters:
- id tile id (0 <= id <= max)
Returns:
-
tile
- Tileset:getTileProperties (id)
-
Returns the tile property of the specified id.(0 <= id <= tileid max)
Parameters:
- id tile id (0 <= id <= tileid max)
Returns:
-
tile
- Tileset:getTileProperty (id, key)
-
Returns the tile property of the specified id.(0 <= id <= tileid max)
Parameters:
- id tile id (0 <= id <= tileid max)
- key key of the properties
Returns:
-
property value