Methods
(static) createId() → {String}
Returns:
- Type
- String
(static) getRandomFloat(min, max) → {float}
Get a random float number between a min (inclusive) and max (exclusive) value
Parameters:
Name | Type | Description |
---|---|---|
min |
number | minimum value |
max |
number | maximum value |
Returns:
- Type
- float
(static) getRandomInt(min, max) → {integer}
Get a random integer number between a min (inclusive) and max (exclusive) value
Parameters:
Name | Type | Description |
---|---|---|
min |
number | minimum value |
max |
number | maximum value |
Returns:
- Type
- integer
(static) getUniqueName(name, nameArrayopt) → {string}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
name |
string | String name to make unique. |
|
nameArray |
Array.<string> |
<optional> |
Array of string names to check agains. |
Returns:
- Type
- string
(static) wait(secondsopt, optionsopt) → {Deferred}
Return a deferred promise that will wait a given number of seconds before
resolving. Pass delta time in milliseconds to the deferred promise's execute
method in an update loop to progress time.
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
seconds |
number |
<optional> |
0 | Number of seconds to wait before resolving. |
||||||||||||||||||||
options |
Object |
<optional> |
Optional options object Properties
|
Returns:
- Type
- Deferred