Class: BringToTop

Phaser.Component. BringToTop

new BringToTop()

The BringToTop Component features quick access to Group and DisplayObject sorting-related methods.

Source:
src/gameobjects/components/BringToTop.js line 12

Methods

bringToTop()

Brings this Game Object to the top of its parent's display list (the last position). Visually this means it will render over the top of all other children of the same parent.

If this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World, because the World is the root Group from which all Game Objects descend.

Source:
src/gameobjects/components/BringToTop.js line 24
Returns:

This instance.

Type
PIXI.DisplayObject

moveDown()

Moves this Game Object down one place in its parents display list. This call has no effect if the Game Object is already at the bottom of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World, because the World is the root Group from which all Game Objects descend.

Source:
src/gameobjects/components/BringToTop.js line 84
Returns:

This instance.

Type
PIXI.DisplayObject

moveUp()

Moves this Game Object up one place in its parent's display list. This call has no effect if the Game Object is already at the top of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World, because the World is the root Group from which all Game Objects descend.

Source:
src/gameobjects/components/BringToTop.js line 64
Returns:

This instance.

Type
PIXI.DisplayObject

sendToBack()

Sends this Game Object to the bottom of its parent's display list (the first position). Visually this means it will render below all other children of the same parent.

If this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World, because the World is the root Group from which all Game Objects descend.

Source:
src/gameobjects/components/BringToTop.js line 44
Returns:

This instance.

Type
PIXI.DisplayObject

phaser-ce@2.20.0 is on GitHub and NPM

Documentation generated by JSDoc 3.6.7 on 2022-12-10 using Tomorrow.