Phaser API Documentation



Retrieves the value for the given key, or undefined if it doesn't exist.

You can also access values via the values object. For example, if you had a key called gold you can do either:'gold');

Or access the value directly:;

You can also pass in an array of keys, in which case an array of values will be returned:[ 'gold', 'armor', 'health' ]);

This approach is useful for destructuring arrays in ES6.


name type description
key string | Array.<string>

The key of the value to retrieve, or an array of keys.


The value belonging to the given key, or an array of values, the order of which will match the input array.

  • *
Since: 3.0.0
Source: src/data/DataManager.js (Line 116)