mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 14:08:28 +00:00
Add Phaser.Time.Clock#startTime
This commit is contained in:
parent
5e185f32b5
commit
2ed4836dd2
1 changed files with 13 additions and 0 deletions
|
@ -56,6 +56,17 @@ var Clock = new Class({
|
|||
*/
|
||||
this.now = 0;
|
||||
|
||||
/**
|
||||
* The time the Clock (and Scene) started, in milliseconds.
|
||||
*
|
||||
* This can be compared to the `time` parameter passed to a Scene's `update` method.
|
||||
*
|
||||
* @name Phaser.Time.Clock#startTime
|
||||
* @type {number}
|
||||
* @since 3.60.0
|
||||
*/
|
||||
this.startTime = 0;
|
||||
|
||||
/**
|
||||
* The scale of the Clock's time delta.
|
||||
*
|
||||
|
@ -144,6 +155,8 @@ var Clock = new Class({
|
|||
*/
|
||||
start: function ()
|
||||
{
|
||||
this.startTime = this.systems.game.loop.time;
|
||||
|
||||
var eventEmitter = this.systems.events;
|
||||
|
||||
eventEmitter.on(SceneEvents.PRE_UPDATE, this.preUpdate, this);
|
||||
|
|
Loading…
Add table
Reference in a new issue