TilemapParser.parse()

<static> parse(game, key, tileWidth, tileHeight, width, height) → {object}

Parse tilemap data from the cache and creates data for a Tilemap object.

Parameters
Name Type Argument Default Description
game Phaser.Game

Game reference to the currently running game.

key string

The key of the tilemap in the Cache.

tileWidth number <optional>
32

The pixel width of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data.

tileHeight number <optional>
32

The pixel height of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data.

width number <optional>
10

The width of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this.

height number <optional>
10

The height of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this.

Returns
object -

The parsed map object.

Source code: tilemap/TilemapParser.js (Line 28)
doc_phaser
2017-02-14 11:16:48
Comments
Leave a Comment

Please login to continue.