Skip to content

Commit 3f23b3d

Browse files
committed
Fixed issue where Animations resuming from a pause would skip frames (thanks @merixstudio, fix phaserjs#730)
1 parent 1ef617c commit 3f23b3d

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ Version 2.0.4 - "Mos Shirare" - in development
136136
* Masks now work when used in RenderTextures / CacheAsBitmap and Filters (pixi.js update)
137137
* Fixed bug where stroked text sometimes got clipped (pixi.js update)
138138
* Fixed Polygon.contains for coordinates to the left of the polygon (thanks @vilcans, fix #766)
139+
* Fixed issue where game pause/resume could incorrectly increment paused Timers (thanks @georgiee, fix #759)
140+
* Fixed issue where Animations resuming from a pause would skip frames (thanks @merixstudio, fix #730)
139141

140142

141143
### ToDo

src/time/Time.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ Phaser.Time.prototype = {
307307
gameResumed: function () {
308308

309309
// Level out the elapsed timer to avoid spikes
310-
this.time = Date.now();
310+
this.time = this.now = Date.now();
311311

312312
this.pauseDuration = this.time - this._pauseStarted;
313313

src/time/Timer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ Phaser.Timer.prototype = {
500500
}
501501

502502
this._pauseTotal += this.game.time.pauseDuration;
503-
this._now = this.game.time.time;
503+
this._now = this.game.time.now;
504504

505505
for (var i = 0; i < this.events.length; i++)
506506
{

0 commit comments

Comments
 (0)