Skip to content

Commit

Permalink
small simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
richTrash21 committed Jul 13, 2024
1 parent 7d47cc0 commit 4ffbf0b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
4 changes: 2 additions & 2 deletions flixel/animation/FlxAnimation.hx
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ class FlxAnimation extends FlxBaseAnimation
if (looped && curFrame == loopPoint)
{
curFrame = numFrames - 1;
parent.fireLoopCallback(name);
parent.onLoopComplete.dispatch(name);
}
else
{
Expand All @@ -228,7 +228,7 @@ class FlxAnimation extends FlxBaseAnimation
if (looped && curFrame == numFrames - 1)
{
curFrame = loopPoint;
parent.fireLoopCallback(name);
parent.onLoopComplete.dispatch(name);
}
else
{
Expand Down
6 changes: 0 additions & 6 deletions flixel/animation/FlxAnimationController.hx
Original file line number Diff line number Diff line change
Expand Up @@ -732,12 +732,6 @@ class FlxAnimationController implements IFlxDestroyable
onFinish.dispatch(name);
}

@:allow(flixel.animation)
function fireLoopCallback(?name:String):Void
{
onLoopComplete.dispatch(name);
}

function byNamesHelper(addTo:Array<Int>, frameNames:Array<String>):Void
{
for (frameName in frameNames)
Expand Down

0 comments on commit 4ffbf0b

Please sign in to comment.