We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 34080ed + 8673918 commit 1340d32Copy full SHA for 1340d32
1 file changed
v2-community/src/animation/Animation.js
@@ -320,8 +320,9 @@ Phaser.Animation.prototype = {
320
321
if (frameIndex)
322
{
323
- // Set the current frame index to the found index. Subtract 1 so that it animates to the desired frame on update.
324
- this._frameIndex = frameIndex - 1;
+ // Set the current frame index to the found index. Subtract a directional offset so that it animates to the desired frame on update.
+ var directionalOffset = this.isReversed ? -1 : 1;
325
+ this._frameIndex = frameIndex - directionalOffset;
326
327
// Make the animation update at next update
328
this._timeNextFrame = this.game.time.time;
0 commit comments