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#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#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#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#currentLayer

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

Tilemap#debugMap

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

Tilemap#destroy()

destroy() Removes all layer data from this tile map and nulls the game reference.Note: You are responsible for destroying any TilemapLayer objects you generated yourself, as Tilemap doesn't keep a reference to them. Source code: tilemap/Tilemap.js (Line 1929)

Tilemap#dump()

dump() Dumps the tilemap data out to the console. Source code: tilemap/Tilemap.js (Line 1888)

Tilemap#enableDebug

enableDebug : boolean If set then console.log is used to dump out useful layer creation debug data. Source code: tilemap/Tilemap.js (Line 140)

Tilemap#fill()

fill(index, x, y, width, height, layer) Fills the given area with the specified tile. Parameters Name Type Argument Description index number The index of the tile that the area will be filled with. x number X position of the top left of the area to operate one, given in tiles, not pixels. y number Y position of the top left of the area to operate one, given in tiles, not pixels. width number The width in tiles of the area to operate on. height number The height in tiles o