Tilemap#debugMap

debugMap :array Map data used for debug values only. Source code: tilemap/Tilemap.js (Line 150)

Tilemap#currentLayer

currentLayer : number The current layer. Source code: tilemap/Tilemap.js (Line 145)

Tilemap#createLayer()

createLayer(layer, width, height, group) → {Phaser.TilemapLayer} Creates a new TilemapLayer object. By default TilemapLayers are fixed to the camera.The layer parameter is important. If you've created your map in Tiled then you can get this by looking in Tiled and looking at the Layer name.Or you can open the JSON file it exports and look at the layers[].name value. Either way it must match.If you wish to create a blank layer to put your own tiles on then see Tilemap.createBlankLayer. Parame

Tilemap#createFromTiles()

createFromTiles(tiles, replacements, key, layer, group, properties) → {integer} Creates a Sprite for every object matching the given tile indexes in the map data.You can specify the group that the Sprite will be created in. If none is given it will be created in the World.You can optional specify if the tile will be replaced with another after the Sprite is created. This is useful if you want to lay down specialtiles in a level that are converted to Sprites, but want to replace the tile itsel

Tilemap#createFromObjects()

createFromObjects(name, gid, key, frame, exists, autoCull, group, CustomClass, adjustY) Creates a Sprite for every object matching the given gid in the map data. You can optionally specify the group that the Sprite will be created in. If none isgiven it will be created in the World. All properties from the map data objectgroup are copied across to the Sprite, so you can use this as an easy way toconfigure Sprite properties from within the map editor. For example giving an object a property of

Tilemap#createBlankLayer()

createBlankLayer(name, width, height, tileWidth, tileHeight, group) → {Phaser.TilemapLayer} Creates a new and empty layer on this Tilemap. By default TilemapLayers are fixed to the camera. Parameters Name Type Argument Description name string The name of this layer. Must be unique within the map. width number The width of the layer in tiles. height number The height of the layer in tiles. tileWidth number The width of the tiles the layer uses for calculations. tileHeight num

Tilemap#create()

create(name, width, height, tileWidth, tileHeight, group) → {Phaser.TilemapLayer} Creates an empty map of the given dimensions and one blank layer. If layers already exist they are erased. Parameters Name Type Argument Description name string The name of the default layer of the map. width number The width of the map in tiles. height number The height of the map in tiles. tileWidth number The width of the tiles the map uses for calculations. tileHeight number The height o

Tilemap#copy()

copy(x, y, width, height, layer) → {array} Copies all of the tiles in the given rectangular block into the tilemap data buffer. Parameters Name Type Argument Description x integer X position of the top left of the area to copy (given in tiles, not pixels) y integer Y position of the top left of the area to copy (given in tiles, not pixels) width integer The width of the area to copy (given in tiles, not pixels) height integer The height of the area to copy (given in tiles, no

Tilemap#collision

collision :array An array of collision data (polylines, etc). Source code: tilemap/Tilemap.js (Line 130)

Tilemap#collideIndexes

collideIndexes :array An array of tile indexes that collide. Source code: tilemap/Tilemap.js (Line 125)