/
TILE_OVERLAP_EVENT.js
27 lines (26 loc) · 1.12 KB
/
TILE_OVERLAP_EVENT.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2013-2023 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
/**
* The Arcade Physics Tile Overlap Event.
*
* This event is dispatched by an Arcade Physics World instance if a body overlaps with a Tile _and_
* has its [onOverlap]{@link Phaser.Physics.Arcade.Body#onOverlap} property set to `true`.
*
* It provides an alternative means to handling overlap events rather than using the callback approach.
*
* Listen to it from a Scene using: `this.physics.world.on('tileoverlap', listener)`.
*
* Please note that 'collide' and 'overlap' are two different things in Arcade Physics.
*
* @event Phaser.Physics.Arcade.Events#TILE_OVERLAP
* @type {string}
* @since 3.16.1
*
* @param {Phaser.GameObjects.GameObject} gameObject - The Game Object involved in the overlap. This is the parent of `body`.
* @param {Phaser.Tilemaps.Tile} tile - The tile the body overlapped.
* @param {Phaser.Physics.Arcade.Body} body - The Arcade Physics Body of the Game Object involved in the overlap.
*/
module.exports = 'tileoverlap';