Phaser API Documentation

  Version: 
<static> GetValue(source, key, defaultValue)

Description:

Retrieves a value from an object.

Parameters:

name type description
source object

The object to retrieve the value from.

key string

The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (.) - banner.hideBanner would return the value of the hideBanner property from the object stored in the banner property of the source object.

defaultValue *

The value to return if the key isn't found in the source object.

Returns:
Description:

The value of the requested key.

Type:
  • *
Since: 3.0.0