/
UPDATE_EVENT.js
31 lines (30 loc) · 1.28 KB
/
UPDATE_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
24
25
26
27
28
29
30
31
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2020 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
/**
* The Scene Systems Update Event.
*
* This event is dispatched by a Scene during the main game loop step.
*
* The event flow for a single step of a Scene is as follows:
*
* 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}
* 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}
* 3. The `Scene.update` method is called, if it exists
* 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}
* 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}
*
* Listen to it from a Scene using `this.scene.events.on('update', listener)`.
*
* A Scene will only run its step if it is active.
*
* @event Phaser.Scenes.Events#UPDATE
* @since 3.0.0
*
* @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.
* @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.
* @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.
*/
module.exports = 'update';