swap(child1, child2)
Swaps the position of two children in this group. Both children must be in this group, a child cannot be swapped with itself, and unparented children cannot be swapped.
Parameters
Name Type Description child1 any The first child to swap. child2 any The second child to swap.
Inherited From Phaser.Group#swap Source code: core/Group.js (Line 891)