Class: Clock

Phaser.Time. Clock

[description]


new Clock(scene)

Parameters:
Name Type Description
scene Phaser.Scene

[description]

Since: 3.0.0
Source: src/time/Clock.js (Line 11)

Members


now :number

[description]

Type:
  • number
Since: 3.0.0
Source: src/time/Clock.js (Line 46)

paused :boolean

[description]

Type:
  • boolean
Since: 3.0.0
Default Value:
  • false
Source: src/time/Clock.js (Line 68)

scene :Phaser.Scene

[description]

Type:
Since: 3.0.0
Source: src/time/Clock.js (Line 28)

systems :Phaser.Scenes.Systems

[description]

Type:
Since: 3.0.0
Source: src/time/Clock.js (Line 37)

timeScale :number

[description]

Type:
  • number
Since: 3.0.0
Default Value:
  • 1
Source: src/time/Clock.js (Line 58)

Methods


addEvent(config)

[description]

Parameters:
Name Type Description
config TimerEventConfig

[description]

Since: 3.0.0
Source: src/time/Clock.js (Line 146)
Returns:

[description]

Type
Phaser.Time.TimerEvent

clearPendingEvents()

[description]

Since: 3.0.0
Source: src/time/Clock.js (Line 183)
Returns:

[description]

Type
Phaser.Time.Clock

delayedCall(delay, callback, args, callbackScope)

[description]

Parameters:
Name Type Description
delay number

[description]

callback function

[description]

args Array.<*>

[description]

callbackScope *

[description]

Since: 3.0.0
Source: src/time/Clock.js (Line 165)
Returns:

[description]

Type
Phaser.Time.TimerEvent

preUpdate(time, delta)

[description]

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/time/Clock.js (Line 213)

removeAllEvents()

[description]

Since: 3.0.0
Source: src/time/Clock.js (Line 198)
Returns:

[description]

Type
Phaser.Time.Clock

update(time, delta)

[description]

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/time/Clock.js (Line 264)