Module flower.tiled.TileMap

Class that displays the map data created by Tiled Map Editor.

Extends:

Info:

  • Release: V3.0.0
  • Author: Makoto

Functions

TileMap:init () The constructor.
TileMap:loadLueFile (luefile) Load the map data from luefile.
TileMap:loadMapData (data) Load the map data.
TileMap:saveMapData () Save the map data.
TileMap:clearMapData () Clear the map data.
TileMap:updateRenderOrder (priority, margin) Update the order of the rendering.
TileMap:setResourceDirectory (path) Set the directory to refer to the resource.
TileMap:createTilesets (tilesetDatas) Create a tilesets.
TileMap:createMapLayers (layerDatas) Create a layers on the map from the given data's.
TileMap:createMapLayer (layerData) Create a layer on the map from the given data.
TileMap:getMapLayers () Returns the layers on the map.
TileMap:addMapLayer (layer) Add the layer.
TileMap:removeMapLayer (layer) Remove the layer.
TileMap:removeMapLayers () Remove all the layers.
TileMap:findMapLayerByName (name) Finds and returns the layer.
TileMap:getTilesets () Returns the tilesets.
TileMap:addTileset (tileset) Add the tileset.
TileMap:removeTileset (tileset) Remove the tileset.
TileMap:findTilesetByGid (gid) Finds and returns the tileset from the specified gid.
TileMap:getProperty (key) Returns the property with the specified key.
TileMap:getPropertyAsNumber (key) Returns the property.
TileMap:getTileProperty (gid, key) Returns the tile property with the specified gid.
TileMap:getTileProperties (gid) Returns the tile properties with the specified gid.
TileMap:isOrthogonal () Returns true if the orientation is orthogonal.
TileMap:isIsometric () Returns true if the orientation is isometric.


Functions

TileMap:init ()
The constructor.
TileMap:loadLueFile (luefile)
Load the map data from luefile.

Parameters:

  • luefile path.
TileMap:loadMapData (data)
Load the map data.

Parameters:

  • data mapdata.
TileMap:saveMapData ()
Save the map data.

Returns:

    mapdata.
TileMap:clearMapData ()
Clear the map data.
TileMap:updateRenderOrder (priority, margin)
Update the order of the rendering. If you are using a single layer, you should update the drawing order in a timely manner.

Parameters:

  • priority Priority of start
  • margin Priority margin
TileMap:setResourceDirectory (path)
Set the directory to refer to the resource.

Parameters:

  • path resource directory
TileMap:createTilesets (tilesetDatas)
Create a tilesets.

Parameters:

  • tilesetDatas tileset data's
TileMap:createMapLayers (layerDatas)
Create a layers on the map from the given data's.

Parameters:

  • layerDatas layer data's
TileMap:createMapLayer (layerData)
Create a layer on the map from the given data.

Parameters:

  • layerData layer data
TileMap:getMapLayers ()
Returns the layers on the map. You must not be edited on this table.

Returns:

    layers.
TileMap:addMapLayer (layer)
Add the layer. Also be added to the rendering list.

Parameters:

  • layer layer.
TileMap:removeMapLayer (layer)
Remove the layer.

Parameters:

  • layer layer
TileMap:removeMapLayers ()
Remove all the layers.
TileMap:findMapLayerByName (name)
Finds and returns the layer.

Parameters:

  • name The name of the layer
TileMap:getTilesets ()
Returns the tilesets.

Returns:

    tilesets
TileMap:addTileset (tileset)
Add the tileset.

Parameters:

  • tileset tileset
TileMap:removeTileset (tileset)
Remove the tileset.

Parameters:

  • tileset Tileset
TileMap:findTilesetByGid (gid)
Finds and returns the tileset from the specified gid.

Parameters:

  • gid gid

Returns:

    TMXTileset
TileMap:getProperty (key)
Returns the property with the specified key.

Parameters:

  • key property key

Returns:

    property value
TileMap:getPropertyAsNumber (key)
Returns the property.

Parameters:

  • key key.

Returns:

    value.
TileMap:getTileProperty (gid, key)
Returns the tile property with the specified gid.

Parameters:

  • gid tile gid
  • key key of the properties

Returns:

    property value
TileMap:getTileProperties (gid)
Returns the tile properties with the specified gid.

Parameters:

  • gid tile gid

Returns:

    tile property value
TileMap:isOrthogonal ()
Returns true if the orientation is orthogonal.

Returns:

    True if the orientation is orthogonal.
TileMap:isIsometric ()
Returns true if the orientation is isometric.

Returns:

    True if the orientation is isometric.
generated by LDoc 1.3