mirror of
https://github.com/photonstorm/phaser
synced 2024-12-21 02:23:29 +00:00
14 lines
629 B
TypeScript
14 lines
629 B
TypeScript
|
/**
|
||
|
* Removes a random object from the given array and returns it.
|
||
|
*
|
||
|
* 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 removed.
|
||
|
*/
|
||
|
export default function (array: any, start: any, length: any): any;
|