Skip to content

Commit

Permalink
Adding a timeScale variable to FlxAnimationController. (#2913)
Browse files Browse the repository at this point in the history
* Update FlxAnimationController.hx

* Update FlxAnimationController.hx

* Update FlxAnimationController.hx
  • Loading branch information
MAJigsaw77 committed Sep 16, 2023
1 parent 5e563ad commit b8e7bb5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion flixel/animation/FlxAnimationController.hx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ class FlxAnimationController implements IFlxDestroyable
*/
public var finishCallback:(name:String) -> Void;

/**
* How fast or slow time should pass for this animation controller
*/
public var timeScale:Float = 1.0;

/**
* Internal, reference to owner sprite.
*/
Expand Down Expand Up @@ -92,7 +97,7 @@ class FlxAnimationController implements IFlxDestroyable
{
if (_curAnim != null)
{
_curAnim.update(elapsed);
_curAnim.update(elapsed * timeScale);
}
else if (_prerotated != null)
{
Expand Down

0 comments on commit b8e7bb5

Please sign in to comment.