Skip to content

Commit 8d71e8a

Browse files
committed
Animation.update skips ahead frames when the system is lagging, however it failed to set the animation to the final frame in the sequence if the animation skipped ahead too far (thanks @richpixel phaserjs#1628)
1 parent a31317a commit 8d71e8a

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ We've also removed functions and properties from Pixi classes that Phaser doesn'
187187
* Tween.interpolationFunction was using the incorrect context to invoke the function. This is now defined in `TweenData.interpolationContext` and defaults to `Phaser.Math`. If you provide your own interpolation function then please adjust the context accordingly (thanks @FridayMarch26th #1618)
188188
* Graphics.drawEllipse method was missing (thanks @jackrugile #1574)
189189
* A TweenData wouldn't take into account the `repeatDelay` property when repeating the tween, but now does. A TweenData also has a new property `yoyoDelay` which controls the delay before the yoyo will start, allowing you to set both independently (thanks @DreadKnight #1469)
190+
* Animation.update skips ahead frames when the system is lagging, however it failed to set the animation to the final frame in the sequence if the animation skipped ahead too far (thanks @richpixel #1628)
190191

191192
For changes in previous releases please see the extensive [Version History](https://github.com/photonstorm/phaser/blob/master/CHANGELOG.md).
192193

src/animation/Animation.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,9 @@ Phaser.Animation.prototype = {
575575
*/
576576
complete: function () {
577577

578+
this._frameIndex = this._frames.length - 1;
579+
this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]);
580+
578581
this.isPlaying = false;
579582
this.isFinished = true;
580583
this.paused = false;

0 commit comments

Comments
 (0)