Tilemap#addTilesetImage()

addTilesetImage(tileset, key, tileWidth, tileHeight, tileMargin, tileSpacing, gid) → {Phaser.Tileset} Adds an image to the map to be used as a tileset. A single map may use multiple tilesets.Note that the tileset name can be found in the JSON file exported from Tiled, or in the Tiled editor. Parameters Name Type Argument Default Description tileset string The name of the tileset as specified in the map data. key string | Phaser.BitmapData <optional> The key of the Phaser.Cac

Tile#y

y : number The y map coordinate of this tile. Source code: tilemap/Tile.js (Line 39)

Tile#x

x : number The x map coordinate of this tile. Source code: tilemap/Tile.js (Line 34)

Tile#worldY

worldY Properties: Name Type Description y number The y map coordinate of this tile. Source code: tilemap/Tile.js (Line 59)

Tile#worldX

worldX Properties: Name Type Description x number The x map coordinate of this tile. Source code: tilemap/Tile.js (Line 54)

Tile#width

width : number The width of the tile in pixels. Source code: tilemap/Tile.js (Line 64)

Tile#top

[readonly] top : number The y value. Source code: tilemap/Tile.js (Line 383)

Tile#Tile

new Tile(layer, index, x, y, width, height) A Tile is a representation of a single tile within the Tilemap. Parameters Name Type Description layer object The layer in the Tilemap data that this tile belongs to. index number The index of this tile type in the core map data. x number The x coordinate of this tile. y number The y coordinate of this tile. width number Width of the tile. height number Height of the tile. Source code: tilemap/Tile.js (Line 19)

Tile#setCollisionCallback()

setCollisionCallback(callback, context) Set a callback to be called when this tile is hit by an object.The callback must true true for collision processing to take place. Parameters Name Type Description callback function Callback function. context object Callback will be called within this context. Source code: tilemap/Tile.js (Line 205)

Tile#setCollision()

setCollision(left, right, up, down) Sets the collision flags for each side of this tile and updates the interesting faces list. Parameters Name Type Description left boolean Indicating collide with any object on the left. right boolean Indicating collide with any object on the right. up boolean Indicating collide with any object on the top. down boolean Indicating collide with any object on the bottom. Source code: tilemap/Tile.js (Line 233)