mirror of
https://github.com/photonstorm/phaser
synced 2024-12-11 22:03:09 +00:00
13 lines
612 B
TypeScript
13 lines
612 B
TypeScript
/**
|
|
* Fetch a random entry from the given array.
|
|
*
|
|
* Will return null if there are no array items that fall within the specified range
|
|
* or if there is no item for the randomly chosen index.
|
|
*
|
|
* @method
|
|
* @param {any[]} objects - An array of objects.
|
|
* @param {integer} startIndex - Optional offset off the front of the array. Default value is 0, or the beginning of the array.
|
|
* @param {integer} length - Optional restriction on the number of values you want to randomly select from.
|
|
* @return {object} The random object that was selected.
|
|
*/
|
|
export default function (array: any, start: any, length: any): any;
|