Phaser API Documentation

  Version: 

Member of: Phaser.Structs.List

getRandom([startIndex], [length])

Description:

Returns a random child from the group.

Parameters:

name type arguments Default description
startIndex number <optional> 0

Offset from the front of the group (lowest child).

length number <optional> (to top)

Restriction on the number of values you want to randomly select from.

Returns:
Description:

A random child of this Group.

Type:
  • *
Examples:
Since: 3.0.0
Source: src/structs/List.js (Line 238)