Phaser API Documentation

  Version: 

Member of: Phaser.Utils.Array

<static> RotateRight(array, [total])

Description:

Moves the element at the end of the array to the start, shifting all items in the process. The "rotation" happens to the right.

Parameters:

name type arguments Default description
array array

The array to shift to the right. This array is modified in place.

total number <optional> 1

The number of times to shift the array.

Returns:
Description:

The most recently shifted element.

Type:
  • *
Since: 3.0.0