For each tile in the given rectangular area (in tile coordinates) of the layer, run the given callback. Similar to Array.prototype.forEach in vanilla JS.
name | type | description |
---|---|---|
callback | EachTileCallback |
The callback. Each tile in the given area will be passed to this callback as the first and only parameter. |
context | object |
The context under which the callback should be run. |
tileX | number |
The left most tile index (in tile coordinates) to use as the origin of the area to filter. |
tileY | number |
The top most tile index (in tile coordinates) to use as the origin of the area to filter. |
width | number |
How many tiles wide from the |
height | number |
How many tiles tall from the |
filteringOptions | Phaser.Types.Tilemaps.FilteringOptions |
Optional filters to apply when getting the tiles. |
layer | Phaser.Tilemaps.LayerData |
The Tilemap Layer to act upon. |