Phaser API Documentation

  Version: 
swap(child1, child2)

Description:

Swaps the position of two Game Objects in this Container. Both Game Objects must belong to this Container.

Parameters:

name type description
child1 Phaser.GameObjects.GameObject

The first Game Object to swap.

child2 Phaser.GameObjects.GameObject

The second Game Object to swap.

Returns:
Description:

This Container instance.

Since: 3.4.0