inherit qc.Node


The tilemap file is made by Tiled Map Editor. Tile Layer Format is csv, saved as .txt file. After setting tilemap, need to call Tilemap.generateLayers() to generate TileLayer.

Create Tilemap

    var tilemap  = new qc.game.add.tilemap(parent);


Variable Name Type Description
nativeSize qc.Rectangle Read only. native size(not scale)
layers Array The layer array
tilesets Array The tileset array
scrollX number The scroll distance in axis x
scrollY number The scroll distance in axis y
tileWidth number The width of tile
tileHeight number The height of tile
mapWidth number The cell count in axis x
mapHeight number The cell count in axis y
data qc.TextAsset Tilemap data


Method Description
resetNativeSize Reset size to native size
generateLayers Generate the tile layer
getLayerByIndex Get layer by index
getLayerByName Get layer by name
getTilePosition Get tile position