Phaser API Documentation

  Version: 
<static> SetCenterY(gameObject, y)

Description:

Positions the Game Object so that the center top of its bounds aligns with the given coordinate.

Parameters:

name type description
gameObject Phaser.GameObjects.GameObject

The Game Object that will be re-positioned.

y number

The coordinate to position the Game Object bounds on.

Returns:
Description:

The Game Object that was positioned.

Since: 3.0.0