Timeline
Introduction¶
Update timers, built-in object of phaser. Each scene has a timeline (scene.time
) already.
- Author: Richard Davey
Usage¶
Time-scale¶
-
Get time-scale
var timeScale = scene.time.timeScale;
-
Set time-scale
scene.time.timeScale = 2;
Pause or resume¶
-
Pause
scene.time.paused = true;
-
Resume
scene.time.paused = false;
Get current game-time¶
var time = scene.time.now;
Game-time is not system time.
Create timeline object¶
var timeline = new Phaser.Time.Clock(scene);