Tilemap#forEach()

forEach(callback, context, x, y, width, height, layer)

For each tile in the given area defined by x/y and width/height run the given callback.

Parameters
Name Type Argument Description
callback number

The callback. Each tile in the given area will be passed to this callback as the first and only parameter.

context number

The context under which the callback should be run.

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 number

The height in tiles of the area to operate on.

layer number | string | Phaser.TilemapLayer <optional>

The layer to operate on.

Source code: tilemap/Tilemap.js (Line 1694)
doc_phaser
2017-02-14 11:15:15
Comments
Leave a Comment

Please login to continue.