Phaser API Documentation

  Version: 
getCenterX([camera])

Description:

Gets the world X position of the center of the tile, factoring in the layer's position, scale and scroll.

Parameters:

name type arguments description
camera Phaser.Cameras.Scene2D.Camera <optional>

The Camera to use to perform the check.

Returns:
Description:

The center x position of this Tile.

Type:
  • number
Since: 3.0.0
Source: src/tilemaps/Tile.js (Line 496)