Generate a random bool result based on the chance value.
Generate a random bool result based on the chance value. Returns true or false based on the chance value (default 50%). For example if you wanted a player to have a 30% chance of getting a bonus, call chanceRoll(30) - true means the chance passed, - false means it failed.
The chance of receiving the value. A number between 0 and 100 (effectively 0% to 100%).
True if the roll passed, or false otherwise.
This is a slightly modified version of http://api.jquery.com/jQuery.extend/
This is a slightly modified version of http://api.jquery.com/jQuery.extend/
Perform a deep copy?
The target object to copy to.
The extended object.
Gets an objects property by string.
Gets an objects property by string.
The object to traverse.
The property whose value will be returned.
the value of the property or null if property isn"t found.
This is a slightly modified version of jQuery.isPlainObject.
This is a slightly modified version of jQuery.isPlainObject. A plain object is an object whose internal class property is [object Object].
The object to inspect.
true if the object is plain, otherwise false.
Mixes the source object into the destination object, returning the newly modified destination object.
Mixes the source object into the destination object, returning the newly modified destination object.
The object to copy (the source object).
The object to copy to (the destination object).
The modified destination object.
Mixes in an existing mixin object with the target.
Mixes in an existing mixin object with the target.
Values in the mixin that have either get
or set
functions are created as properties via defineProperty
except if they also define a clone
method - if a clone method is defined that is called instead and
the result is assigned directly.
The target object to receive the new functions.
The object to copy the functions from.
If the target object already has a matching function should it be overwritten or not?
The target string. toString() will be called on the string, which means you can also pass in common data types like numbers.
The number of characters to be added.
The string to pad it out with (defaults to a space).
The direction dir = 1 (left), 2 (right), 3 (both).
The padded string.
pad("bob", 6, "-", 2)
Get a unit dimension from a string.
Get a unit dimension from a string.
The size to parse.
The window dimension to check.
The parsed dimension.
Choose between one of two values randomly.
Choose between one of two values randomly.
the first choice
the second choice
The randomly selected choice
Takes the given string and reverses it, returning the reversed string.
Takes the given string and reverses it, returning the reversed string. For example if given the string "Atari 520ST" it would return "TS025 iratA".
The string to be reversed.
The reversed string.
Sets an objects property by string.
Sets an objects property by string.
The object to traverse
The property whose value will be changed
The object on which the property was set.
Phaser.Utils Singleton