mirror of
https://github.com/photonstorm/phaser
synced 2024-11-17 10:18:42 +00:00
Game.getTime
would return NaN
because it incorrectly accessed the time value from the TimeStep.
This commit is contained in:
parent
ec5f3d3a33
commit
b86d737e2e
1 changed files with 3 additions and 3 deletions
|
@ -604,6 +604,7 @@ var Game = new Class({
|
|||
|
||||
/**
|
||||
* Returns the current game frame.
|
||||
*
|
||||
* When the game starts running, the frame is incremented every time Request Animation Frame, or Set Timeout, fires.
|
||||
*
|
||||
* @method Phaser.Game#getFrame
|
||||
|
@ -617,8 +618,7 @@ var Game = new Class({
|
|||
},
|
||||
|
||||
/**
|
||||
* Returns the current game timestamp.
|
||||
* When the game starts running, the frame is incremented every time Request Animation Frame, or Set Timeout, fires.
|
||||
* Returns the time that the current game step started at, as based on `performance.now`.
|
||||
*
|
||||
* @method Phaser.Game#getTime
|
||||
* @since 3.16.0
|
||||
|
@ -627,7 +627,7 @@ var Game = new Class({
|
|||
*/
|
||||
getTime: function ()
|
||||
{
|
||||
return this.loop.frame.time;
|
||||
return this.loop.now;
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue