Phaser.Physics.Arcade.Tilemap

Scope: static

Source: src/physics/arcade/tilemap/index.js#L7

Methods:

Public Members

ProcessTileCallbacks

<static> ProcessTileCallbacks(tile, sprite)

Description:

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

Parameters:

nametypeoptionaldescription
tilePhaser.Tilemaps.TileNoThe Tile to process.
spritePhaser.GameObjects.SpriteNoThe Game Object to process with the Tile.

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

Source: src/physics/arcade/tilemap/ProcessTileCallbacks.js#L7
Since: 3.0.0


ProcessTileSeparationX

<static> ProcessTileSeparationX(body, x)

Description:

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

Parameters:

nametypeoptionaldescription
bodyPhaser.Physics.Arcade.BodyNoThe Body object to separate.
xnumberNoThe x separation amount.

Source: src/physics/arcade/tilemap/ProcessTileSeparationX.js#L7
Since: 3.0.0


ProcessTileSeparationY

<static> ProcessTileSeparationY(body, y)

Description:

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

Parameters:

nametypeoptionaldescription
bodyPhaser.Physics.Arcade.BodyNoThe Body object to separate.
ynumberNoThe y separation amount.

Source: src/physics/arcade/tilemap/ProcessTileSeparationY.js#L7
Since: 3.0.0


SeparateTile

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

Description:

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

Parameters:

nametypeoptionaldescription
inumberNoThe index of the tile within the map data.
bodyPhaser.Physics.Arcade.BodyNoThe Body object to separate.
tilePhaser.Tilemaps.TileNoThe tile to collide against.
tileWorldRectPhaser.Geom.RectangleNoA rectangle-like object defining the dimensions of the tile.
tilemapLayerPhaser.Tilemaps.TilemapLayerNoThe tilemapLayer to collide against.
tileBiasnumberNoThe tile bias value. Populated by the World.TILE_BIAS constant.
isLayerbooleanNoIs this check coming from a TilemapLayer or an array of tiles?

Returns: boolean - true if the body was separated, otherwise false.

Source: src/physics/arcade/tilemap/SeparateTile.js#L11
Since: 3.0.0


TileCheckX

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

Description:

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

Parameters:

nametypeoptionaldescription
bodyPhaser.Physics.Arcade.BodyNoThe Body object to separate.
tilePhaser.Tilemaps.TileNoThe tile to check.
tileLeftnumberNoThe left position of the tile within the tile world.
tileRightnumberNoThe right position of the tile within the tile world.
tileBiasnumberNoThe tile bias value. Populated by the World.TILE_BIAS constant.
isLayerbooleanNoIs this check coming from a TilemapLayer or an array of tiles?

Returns: number - The amount of separation that occurred.

Source: src/physics/arcade/tilemap/TileCheckX.js#L9
Since: 3.0.0


TileCheckY

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

Description:

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

Parameters:

nametypeoptionaldescription
bodyPhaser.Physics.Arcade.BodyNoThe Body object to separate.
tilePhaser.Tilemaps.TileNoThe tile to check.
tileTopnumberNoThe top position of the tile within the tile world.
tileBottomnumberNoThe bottom position of the tile within the tile world.
tileBiasnumberNoThe tile bias value. Populated by the World.TILE_BIAS constant.
isLayerbooleanNoIs this check coming from a TilemapLayer or an array of tiles?

Returns: number - The amount of separation that occurred.

Source: src/physics/arcade/tilemap/TileCheckY.js#L9
Since: 3.0.0


TileIntersectsBody

<static> TileIntersectsBody(tileWorldRect, body)

Description:

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

Parameters:

nametypeoptionaldescription
tileWorldRectObjectNoA rectangle object that defines the tile placement in the world.
bodyPhaser.Physics.Arcade.BodyNoThe body to check for intersection against.

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

Source: src/physics/arcade/tilemap/TileIntersectsBody.js#L7
Since: 3.0.0


Private Members

Updated on