A function to process the collision callbacks between a single tile and an Arcade Physics enabled Game Object.
name | type | description |
---|---|---|
tile | Phaser.Tilemaps.Tile |
The Tile to process. |
sprite | Phaser.GameObjects.Sprite |
The Game Object to process with the Tile. |
The result of the callback, true
for further processing, or false
to skip this pair.
Internal function to process the separation of a physics body from a tile.
name | type | description |
---|---|---|
body | Phaser.Physics.Arcade.Body |
The Body object to separate. |
x | number |
The x separation amount. |
Internal function to process the separation of a physics body from a tile.
name | type | description |
---|---|---|
body | Phaser.Physics.Arcade.Body |
The Body object to separate. |
y | number |
The y separation amount. |
The core separation function to separate a physics body and a tile.
name | type | description |
---|---|---|
i | number |
The index of the tile within the map data. |
body | Phaser.Physics.Arcade.Body |
The Body object to separate. |
tile | Phaser.Tilemaps.Tile |
The tile to collide against. |
tileWorldRect | Phaser.Geom.Rectangle |
A rectangle-like object defining the dimensions of the tile. |
tilemapLayer | Phaser.Tilemaps.TilemapLayer |
The tilemapLayer to collide against. |
tileBias | number |
The tile bias value. Populated by the |
isLayer | boolean |
Is this check coming from a TilemapLayer or an array of tiles? |
true
if the body was separated, otherwise false
.
Check the body against the given tile on the X axis. Used internally by the SeparateTile function.
name | type | description |
---|---|---|
body | Phaser.Physics.Arcade.Body |
The Body object to separate. |
tile | Phaser.Tilemaps.Tile |
The tile to check. |
tileLeft | number |
The left position of the tile within the tile world. |
tileRight | number |
The right position of the tile within the tile world. |
tileBias | number |
The tile bias value. Populated by the |
isLayer | boolean |
Is this check coming from a TilemapLayer or an array of tiles? |
The amount of separation that occurred.
Check the body against the given tile on the Y axis. Used internally by the SeparateTile function.
name | type | description |
---|---|---|
body | Phaser.Physics.Arcade.Body |
The Body object to separate. |
tile | Phaser.Tilemaps.Tile |
The tile to check. |
tileTop | number |
The top position of the tile within the tile world. |
tileBottom | number |
The bottom position of the tile within the tile world. |
tileBias | number |
The tile bias value. Populated by the |
isLayer | boolean |
Is this check coming from a TilemapLayer or an array of tiles? |
The amount of separation that occurred.
Checks for intersection between the given tile rectangle-like object and an Arcade Physics body.
name | type | description |
---|---|---|
tileWorldRect | Object |
A rectangle object that defines the tile placement in the world. |
body | Phaser.Physics.Arcade.Body |
The body to check for intersection against. |
Returns true
of the tile intersects with the body, otherwise false
.