Phaser API Documentation

  Version: 
This is a beta release of our new docs system. Found an issue?
Please tell us about it in the #📖-newdocs-feedback channel on the Phaser Discord
Event: PRE_UPDATE
Phaser.Scenes.Events.PRE_UPDATE
PRE_UPDATE

Description:

The Scene Systems Pre 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
  2. UPDATE
  3. The Scene.update method is called, if it exists
  4. POST_UPDATE
  5. PRE_RENDER
  6. RENDER

Listen to it from a Scene using this.events.on('preupdate', listener).

A Scene will only run its step if it is active.

Parameters:

name type description
sys Phaser.Scenes.Systems

A reference to the Scene Systems class of the Scene that emitted this event.

time number

The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.

delta number

The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.

Since: 3.0.0