Skip to content

Commit

Permalink
porting a thing from psych 0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Joalor64GH authored May 28, 2024
1 parent 16c070f commit 2766fda
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 1,920 deletions.
17 changes: 17 additions & 0 deletions source/backend/animation/PsychAnimationController.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package backend.animation;

import flixel.animation.FlxAnimationController;

class PsychAnimationController extends FlxAnimationController {
public var followGlobalSpeed:Bool = true;

public override function update(elapsed:Float):Void {
if (_curAnim != null) {
var speed:Float = timeScale;
if (followGlobalSpeed) speed *= FlxG.animationTimeScale;
_curAnim.update(elapsed * speed);
}
else if (_prerotated != null)
_prerotated.angle = _sprite.angle;
}
}
Loading

0 comments on commit 2766fda

Please sign in to comment.