Phaser API Documentation

  Version: 
weightedPick(array)

Description:

Returns a random element from within the given array, favoring the earlier entries.

Parameters:

name type description
array Array.<T>

The array to pick a random element from.

Returns:
Description:

A random member of the array.

Type:
  • T