Methods
-
list_find_closest(value, array)
-
Finds the value in the list that is closest to the given value
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description valueNumber the search value
arraythe list to search
Code Equivalent:
Phaser.ArrayUtils.findClosest(value, array) -
list_get_random(array)
-
Returns a randomly selected item from the given list.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description arraylist to get the value from
Code Equivalent:
Phaser.ArrayUtils.getRandomItem(array) -
list_remove_random_item(array)
-
Returns a random item and removes it from the list.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description arraylist to get the item from
Code Equivalent:
Phaser.ArrayUtils.removeRandomItem(array) -
list_shuffle(array)
-
Shuffles the contents of the list by changing the positions of all items.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description arraylist to shuffle
Code Equivalent:
Phaser.ArrayUtils.shuffle(array); -
number_list(start, end)
-
Creates and returns a list with every number between the given parameters.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description startNumber the minimum value the list starts with
endNumber the maximum value the list contains
Code Equivalent:
Phaser.ArrayUtils.numberArray(start, end) -
number_list_step(start, end, step)
-
Creates and returns a list starting with the min value, stepping by the given value, and stopping at the max value.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description startNumber the minimum value the list starts with
endNumber the maximum value the list starts with
stepNumber the value to incremement/decrement by
Code Equivalent:
Phaser.ArrayUtils.numberArrayStep(start, end, step)