-
Notifications
You must be signed in to change notification settings - Fork 7.1k
/
SET_DATA_EVENT.js
23 lines (22 loc) · 978 Bytes
/
SET_DATA_EVENT.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
/**
* The Set Data Event.
*
* This event is dispatched by a Data Manager when a new item is added to the data store.
*
* Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for
* the addition of a new data item on a Game Object you would use: `sprite.on('setdata', listener)`.
*
* @event Phaser.Data.Events#SET_DATA
* @type {string}
* @since 3.0.0
*
* @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.
* @param {string} key - The unique key of the data item within the Data Manager.
* @param {any} data - The item that was added to the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.
*/
module.exports = 'setdata';