Skip to content

Commit

Permalink
Update FlxAnimation.hx (HaxeFlixel#1998)
Browse files Browse the repository at this point in the history
  • Loading branch information
Beeblerox authored and Aurel300 committed Apr 17, 2018
1 parent a24ceb8 commit e6cd40f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions flixel/animation/FlxAnimation.hx
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,9 @@ class FlxAnimation extends FlxBaseAnimation
private function set_curFrame(Frame:Int):Int
{
var maxFrameIndex:Int = numFrames - 1;
if (reversed)
Frame = (maxFrameIndex - Frame);

if (Frame >= 0)
var tempFrame:Int = (reversed) ? (maxFrameIndex - Frame) : Frame;

if (tempFrame >= 0)
{
if (!looped && Frame > maxFrameIndex)
{
Expand Down

0 comments on commit e6cd40f

Please sign in to comment.