Skip to content

Commit 936d38c

Browse files
author
Joel Robichaud
committed
Fixed a problem with the Timer class wheere the total pause time would be incorrect after unpausing it twice in a row (game pause followed by code pause).
1 parent f716b0a commit 936d38c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/time/Timer.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,8 +559,9 @@ Phaser.Timer.prototype = {
559559
return;
560560
}
561561

562-
this._pauseTotal += this.game.time.pauseDuration;
563-
this._now = this.game.time.now;
562+
var now = this.game.time.now;
563+
this._pauseTotal += now - this._now;
564+
this._now = now;
564565

565566
this.adjustEvents(this._pauseStarted);
566567

0 commit comments

Comments
 (0)