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 of the tiles the map uses for calculations. | |
group | Phaser.Group | <optional> | Optional Group to add the layer to. If not specified it will be added to the World group. |
Returns
The TilemapLayer object. This is an extension of Phaser.Image and can be moved around the display list accordingly.
- Source code: tilemap/Tilemap.js (Line 210)
Please login to continue.