Class: MapData

MapData()

Holds all of the Tile Map data.

Constructor

new MapData()

Source:

Members

tileMaps

Array of TileMap objects
Source:

Methods

addTileMap(tileMap)

Add a tilemap from a data object
Parameters:
Name Type Description
tileMap Object The tile map data
Source:

getTile(x, y, tileMap, layer)

Get the tile GID at a given position
Parameters:
Name Type Default Description
x number The x position
y number The y position
tileMap number 0 The index of the tile map you are checking
layer number 0 The index of the layer on the tile map you are checking
Source:

setTile(gid, x, y, tileMap, layer)

Set the tile GID at a given position
Parameters:
Name Type Default Description
gid * The gid
x * The x position
y * The y position
tileMap * 0 The index of the tile map you are setting
layer * 0 The index of the layer on the tile map you are setting
Source: