Phaser API Documentation

  Version: 
shiftPosition(x, y, [direction])

Description:

Iterate through the group members changing the position of each element to be that of the element that came before it in the array (or after it if direction = 1)

The first group member position is set to x/y.

Parameters:

name type arguments description
x number

The x coordinate to place the first item in the array at.

y number

The y coordinate to place the first item in the array at.

direction number <optional>

The iteration direction. 0 = first to last and 1 = last to first.

Returns:
Description:

This Group object.

Since: 3.21.0