Namespace: Tilemap

Phaser.Physics.Arcade. Tilemap

Methods


<static> ProcessTileCallbacks(tile, sprite)

A function to process the collision callbacks between a single tile and an Arcade Physics enabled Game Object.

Parameters:
Name Type Description
tile Phaser.Tilemaps.Tile

The Tile to process.

sprite Phaser.GameObjects.Sprite

The Game Object to process with the Tile.

Since: 3.0.0
Source: src/physics/arcade/tilemap/ProcessTileCallbacks.js (Line 7)
Returns:

The result of the callback, true for further processing, or false to skip this pair.

Type
boolean

<static> ProcessTileSeparationX(body, x)

Internal function to process the separation of a physics body from a tile.

Parameters:
Name Type Description
body Phaser.Physics.Arcade.Body

The Body object to separate.

x number

The x separation amount.

Since: 3.0.0
Source: src/physics/arcade/tilemap/ProcessTileSeparationX.js (Line 7)

<static> ProcessTileSeparationY(body, y)

Internal function to process the separation of a physics body from a tile.

Parameters:
Name Type Description
body Phaser.Physics.Arcade.Body

The Body object to separate.

y number

The y separation amount.

Since: 3.0.0
Source: src/physics/arcade/tilemap/ProcessTileSeparationY.js (Line 7)

<static> SeparateTile(i, body, tile, tileWorldRect, tilemapLayer, tileBias, isLayer)

The core separation function to separate a physics body and a tile.

Parameters:
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 World.TILE_BIAS constant.

isLayer boolean

Is this check coming from a TilemapLayer or an array of tiles?

Since: 3.0.0
Source: src/physics/arcade/tilemap/SeparateTile.js (Line 11)
Returns:

true if the body was separated, otherwise false.

Type
boolean

<static> TileCheckX(body, tile, tileLeft, tileRight, tileBias, isLayer)

Check the body against the given tile on the X axis. Used internally by the SeparateTile function.

Parameters:
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 World.TILE_BIAS constant.

isLayer boolean

Is this check coming from a TilemapLayer or an array of tiles?

Since: 3.0.0
Source: src/physics/arcade/tilemap/TileCheckX.js (Line 9)
Returns:

The amount of separation that occurred.

Type
number

<static> TileCheckY(body, tile, tileTop, tileBottom, tileBias, isLayer)

Check the body against the given tile on the Y axis. Used internally by the SeparateTile function.

Parameters:
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 World.TILE_BIAS constant.

isLayer boolean

Is this check coming from a TilemapLayer or an array of tiles?

Since: 3.0.0
Source: src/physics/arcade/tilemap/TileCheckY.js (Line 9)
Returns:

The amount of separation that occurred.

Type
number

<static> TileIntersectsBody(tileWorldRect, body)

Checks for intersection between the given tile rectangle-like object and an Arcade Physics body.

Parameters:
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.

Since: 3.0.0
Source: src/physics/arcade/tilemap/TileIntersectsBody.js (Line 7)
Returns:

Returns true of the tile intersects with the body, otherwise false.

Type
boolean