- Source: src/physics/arcade/tilemap/index.js (Line 7)
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 tilePhaser.Tilemaps.Tile The Tile to process.
spritePhaser.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,
truefor further processing, orfalseto 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 bodyPhaser.Physics.Arcade.Body The Body object to separate.
xnumber 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 bodyPhaser.Physics.Arcade.Body The Body object to separate.
ynumber 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 inumber The index of the tile within the map data.
bodyPhaser.Physics.Arcade.Body The Body object to separate.
tilePhaser.Tilemaps.Tile The tile to collide against.
tileWorldRectPhaser.Geom.Rectangle A rectangle-like object defining the dimensions of the tile.
tilemapLayerPhaser.Tilemaps.TilemapLayer The tilemapLayer to collide against.
tileBiasnumber The tile bias value. Populated by the
World.TILE_BIASconstant.isLayerboolean 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:
trueif the body was separated, otherwisefalse.- 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 bodyPhaser.Physics.Arcade.Body The Body object to separate.
tilePhaser.Tilemaps.Tile The tile to check.
tileLeftnumber The left position of the tile within the tile world.
tileRightnumber The right position of the tile within the tile world.
tileBiasnumber The tile bias value. Populated by the
World.TILE_BIASconstant.isLayerboolean 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 bodyPhaser.Physics.Arcade.Body The Body object to separate.
tilePhaser.Tilemaps.Tile The tile to check.
tileTopnumber The top position of the tile within the tile world.
tileBottomnumber The bottom position of the tile within the tile world.
tileBiasnumber The tile bias value. Populated by the
World.TILE_BIASconstant.isLayerboolean 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 tileWorldRectObject A rectangle object that defines the tile placement in the world.
bodyPhaser.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
trueof the tile intersects with the body, otherwisefalse.- Type
- boolean
