Skip to content

Commit bb7cbb3

Browse files
author
gotenxds
committed
If animation is reversed it should start from last frame.
1 parent 2c752a2 commit bb7cbb3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/animation/Animation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ Phaser.Animation.prototype = {
201201
this._timeLastFrame = this.game.time.time;
202202
this._timeNextFrame = this.game.time.time + this.delay;
203203

204-
this._frameIndex = 0;
204+
this._frameIndex = this.isReversed ? this._frames.length - 1 : 0;
205205
this.updateCurrentFrame(false, true);
206206

207207
this._parent.events.onAnimationStart$dispatch(this._parent, this);

0 commit comments

Comments
 (0)