Phaser.Plugin. TilemapWalker

new TilemapWalker(game, map, layer, x, y) → {Phaser.Plugin.TilemapWalker}

Creates an object that is placed within a layer of a Phaser.Tilemap and can be moved around and rotated using the direction commands.

Parameters:
Name Type Argument Description
game Phaser.Game

Game reference to the currently running game.

map Phaser.Tilemap

A reference to the Tilemap this TilemapWalker belongs to.

layer number | string | Phaser.TilemapLayer <optional>

The layer to operate on. If not given will default to this.currentLayer.

x number

X position of the top left of the area to copy (given in tiles, not pixels)

y number

Y position of the top left of the area to copy (given in tiles, not pixels)

Returns:
Source - out/plugins/TilemapWalker/TilemapWalker.js, line 19

Members

collides :boolean

Does the TilemapWalker collide with the tiles in the map set for collision? If so it cannot move through them.

Default Value:
  • true
Source - out/plugins/TilemapWalker/TilemapWalker.js, line 51

facing :number

The direction the location marker is facing. You can rotate it using the turn and face methods.

Source - out/plugins/TilemapWalker/TilemapWalker.js, line 45

game :Phaser.Game

A reference to the currently running Game.

Source - out/plugins/TilemapWalker/TilemapWalker.js, line 24

history :array

An array containing a history of movements through the map.

Source - out/plugins/TilemapWalker/TilemapWalker.js, line 56

location :Phaser.Point

The current marker location. You can move the marker with the movement methods.

Source - out/plugins/TilemapWalker/TilemapWalker.js, line 39

locationLayer :number

The current layer of the location marker.

Source - out/plugins/TilemapWalker/TilemapWalker.js, line 34

map :Phaser.Tilemap

A reference to the Tilemap this TilemapWalker belongs to.

Source - out/plugins/TilemapWalker/TilemapWalker.js, line 29
Phaser Copyright © 2012-2016 Photon Storm Ltd.
Documentation generated by JSDoc 3.4.3 on Thu Apr 13 2017 12:05:12 GMT-0700 (PDT) using the DocStrap template.