Class: Utils

Phaser. Utils

new Utils()

Source:

Classes

Debug

Methods

<static> extend(deep, target) → {object}

This is a slightly modified version of http://api.jquery.com/jQuery.extend/

Parameters:
Name Type Description
deep boolean

Perform a deep copy?

target object

The target object to copy to.

Source:
Returns:

The extended object.

Type
object

<static> isPlainObject(obj) → {boolean}

This is a slightly modified version of jQuery.isPlainObject. A plain object is an object whose internal class property is [object Object].

Parameters:
Name Type Description
obj object

The object to inspect.

Source:
Returns:
  • true if the object is plain, otherwise false.
Type
boolean

<static> pad(str, len, pad, dir) → {string}

Javascript string pad http://www.webtoolkit.info/. pad = the string to pad it out with (defaults to a space) dir = 1 (left), 2 (right), 3 (both)

Parameters:
Name Type Argument Default Description
str string

The target string.

len number

Description.

pad number

the string to pad it out with (defaults to a space).

dir number <optional>
3

the direction dir = 1 (left), 2 (right), 3 (both).

Source:
Returns:

The padded string

Type
string

<static> shuffle(array) → {array}

A standard Fisher-Yates Array shuffle implementation.

Parameters:
Name Type Description
array array

The array to shuffle.

Source:
Returns:

The shuffled array.

Type
array
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Documentation generated by JSDoc 3.3.0-dev on Thu Nov 28 2013 15:56:35 GMT-0000 (GMT) using the DocStrap template.