Phaser API Documentation

  Version: 

Member of: Phaser.Game

step(time, delta)

Description:

The main Game Step. Called automatically by the Time Step, once per browser frame (typically as a result of Request Animation Frame, or Set Timeout on very old browsers.)

The step will update the global managers first, then proceed to update each Scene in turn, via the Scene Manager.

It will then render each Scene in turn, via the Renderer. This process emits prerender and postrender events.

Parameters:

name type description
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
Source: src/core/Game.js (Line 437)