Tilemap#forEach()

forEach(callback, context, x, y, width, height, layer) For each tile in the given area defined by x/y and width/height run the given callback. Parameters Name Type Argument Description callback number The callback. Each tile in the given area will be passed to this callback as the first and only parameter. context number The context under which the callback should be run. x number X position of the top left of the area to operate one, given in tiles, not pixels. y number Y po

Tilemap#format

format : number The format of the map data, either Phaser.Tilemap.CSV or Phaser.Tilemap.TILED_JSON. Source code: tilemap/Tilemap.js (Line 75)

Tilemap#game

game : Phaser.Game A reference to the currently running Game. Source code: tilemap/Tilemap.js (Line 33)

Tilemap#getImageIndex()

getImageIndex(name) → {number} Gets the image index based on its name. Parameters Name Type Description name string The name of the image to get. Returns number - The index of the image in this tilemap, or null if not found. Source code: tilemap/Tilemap.js (Line 766)

Tilemap#getLayerIndex()

getLayerIndex(name) → {number} Gets the layer index based on its name. Parameters Name Type Description name string The name of the layer to get. Returns number - The index of the layer in this tilemap, or null if not found. Source code: tilemap/Tilemap.js (Line 740)

Tilemap#getTile()

getTile(x, y, layer, nonNull) → {Phaser.Tile} Gets a tile from the Tilemap Layer. The coordinates are given in tile values. Parameters Name Type Argument Default Description x number X position to get the tile from (given in tile units, not pixels) y number Y position to get the tile from (given in tile units, not pixels) layer number | string | Phaser.TilemapLayer <optional> The layer to get the tile from. nonNull boolean <optional> false If true getTile wo

Tilemap#getTileAbove()

getTileAbove(layer, x, y) Gets the tile above the tile coordinates given.Mostly used as an internal function by calculateFaces. Parameters Name Type Description layer number The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). x number The x coordinate to get the tile from. In tiles, not pixels. y number The y coordinate to get the tile from. In tiles, not pixels. Source code: tilemap/Tilemap.js (Line 1143)

Tilemap#getTileBelow()

getTileBelow(layer, x, y) Gets the tile below the tile coordinates given.Mostly used as an internal function by calculateFaces. Parameters Name Type Description layer number The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). x number The x coordinate to get the tile from. In tiles, not pixels. y number The y coordinate to get the tile from. In tiles, not pixels. Source code: tilemap/Tilemap.js (Line 1163)

Tilemap#getTileLeft()

getTileLeft(layer, x, y) Gets the tile to the left of the tile coordinates given.Mostly used as an internal function by calculateFaces. Parameters Name Type Description layer number The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). x number The x coordinate to get the tile from. In tiles, not pixels. y number The y coordinate to get the tile from. In tiles, not pixels. Source code: tilemap/Tilemap.js (Line 1183)

Tilemap#getTileRight()

getTileRight(layer, x, y) Gets the tile to the right of the tile coordinates given.Mostly used as an internal function by calculateFaces. Parameters Name Type Description layer number The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). x number The x coordinate to get the tile from. In tiles, not pixels. y number The y coordinate to get the tile from. In tiles, not pixels. Source code: tilemap/Tilemap.js (Line 1203)