Phaser API Documentation

  Version: 
setAbove(gameObject)

Description:

Move this Game Object so that it appears above the given Game Object.

This means it will render immediately after the other object in the display list.

Both objects must belong to the same display list, or parent container.

This method does not change this Game Objects depth value, it simply alters its list position.

Parameters:

name type description
gameObject Phaser.GameObjects.GameObject

The Game Object that this Game Object will be moved to be above.

Returns:
Description:

This Game Object instance.

Since: 3.85.0