Tilemap#shuffle()

shuffle(x, y, width, height, layer) Shuffles a set of tiles in a given area. It will only randomise the tiles in that area, so if they're all the same nothing will appear to have changed! Parameters Name Type Argument Description 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 num

Tilemap#swap()

swap(tileA, tileB, x, y, width, height, layer) Scans the given area for tiles with an index matching tileA and swaps them with tileB. Parameters Name Type Argument Description tileA number First tile index. tileB number Second tile index. 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 operat

Tilemap#tileHeight

tileHeight : number The base height of the tiles in the map (in pixels). Source code: tilemap/Tilemap.js (Line 65)

Tilemap#Tilemap

new Tilemap(game, key, tileWidth, tileHeight, width, height) Creates a new Phaser.Tilemap object. The map can either be populated with data from a Tiled JSON file or from a CSV file. Tiled is a free software package specifically for creating tile maps, and is available from http://www.mapeditor.org To do this pass the Cache key as the first parameter. When using Tiled data you need only provide the key.When using CSV data you must provide the key and the tileWidth and tileHeight parameters.If

Tilemap#tiles

tiles :array The super array of Tiles. Source code: tilemap/Tilemap.js (Line 115)

Tilemap#tilesets

tilesets :array An array of Tilesets. Source code: tilemap/Tilemap.js (Line 105)

Tilemap#tileWidth

tileWidth : number The base width of the tiles in the map (in pixels). Source code: tilemap/Tilemap.js (Line 60)

Tilemap#version

version : number The version of the map data (as specified in Tiled, usually 1). Source code: tilemap/Tilemap.js (Line 80)

Tilemap#width

width : number The width of the map (in tiles). Source code: tilemap/Tilemap.js (Line 50)

Tilemap#widthInPixels

widthInPixels : number The width of the map in pixels based on width * tileWidth. Source code: tilemap/Tilemap.js (Line 90)