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)

This commit is contained in:
photonstorm 2015-02-22 19:26:56 +00:00
parent a31317ac48
commit 8d71e8a32c
2 changed files with 4 additions and 0 deletions

View file

@ -187,6 +187,7 @@ We've also removed functions and properties from Pixi classes that Phaser doesn'
* 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)
* Graphics.drawEllipse method was missing (thanks @jackrugile #1574)
* 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)
* 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)
For changes in previous releases please see the extensive [Version History](https://github.com/photonstorm/phaser/blob/master/CHANGELOG.md).

View file

@ -575,6 +575,9 @@ Phaser.Animation.prototype = {
*/
complete: function () {
this._frameIndex = this._frames.length - 1;
this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]);
this.isPlaying = false;
this.isFinished = true;
this.paused = false;