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 value
Number the search value
array
the 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 array
list 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 array
list 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 array
list 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 start
Number the minimum value the list starts with
end
Number 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 start
Number the minimum value the list starts with
end
Number the maximum value the list starts with
step
Number the value to incremement/decrement by
Code Equivalent:
Phaser.ArrayUtils.numberArrayStep(start, end, step)