Phaser API Documentation



The Change Data Event.

This event is dispatched by a Data Manager when an item in the data store is changed.

Game Objects with data enabled have an instance of a Data Manager under the data property. So, to listen for a change data event from a Game Object you would use: sprite.on('changedata', listener).

This event is dispatched for all items that change in the Data Manager. To listen for the change of a specific item, use the CHANGE_DATA_KEY_EVENT event.


name type description
parent any

A reference to the object that the Data Manager responsible for this event belongs to.

key string

The unique key of the data item within the Data Manager.

value any

The new value of the item in the Data Manager.

previousValue any

The previous value of the item in the Data Manager.

Since: 3.0.0