These docs are for Phaser 2.6.2 Phaser 3 docs can be found on GitHub pages.
Phaser CE docs can be found on the Phaser CE Documentation site.

Constructor

Event

new Event(target, name, data)

Creates an homogenous object for tracking events so users can know what to expect.

Parameters
Name Type Description
target Object

The target object that the event is called on

name String

The string name of the event that was triggered

data Object

Arbitrary event data to pass along

Source code: plugins/path/EventTarget.js (Line 202)

Extends

  • Object

Public Properties

[readonly] data : Object

The data that was passed in with this event.

Source code: plugins/path/EventTarget.js (Line 253)

[readonly] target : Object

The original target the event triggered on.

Source code: plugins/path/EventTarget.js (Line 235)

[readonly] timeStamp : number

The timestamp when the event occurred.

Source code: plugins/path/EventTarget.js (Line 265)

[readonly] type : string

The string name of the event that this represents.

Source code: plugins/path/EventTarget.js (Line 244)