Skip to content

Commit 98da050

Browse files
add fps to loadAnimatedGraphic (#626)
* add fps to loadAnimatedGraphic wow and it doesn't even break old mods :0 * you'll float too hi georgie
1 parent 31ae98f commit 98da050

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/funkin/backend/utils/CoolUtil.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -609,11 +609,11 @@ class CoolUtil
609609
* @param spr Sprite to load the graphic for
610610
* @param path Path to the graphic
611611
*/
612-
public static function loadAnimatedGraphic(spr:FlxSprite, path:String) {
612+
public static function loadAnimatedGraphic(spr:FlxSprite, path:String, fps:Float = 24.0) {
613613
spr.frames = Paths.getFrames(path, true);
614614

615615
if (spr.frames != null && spr.frames.frames != null) {
616-
spr.animation.add("idle", [for(i in 0...spr.frames.frames.length) i], 24, true);
616+
spr.animation.add("idle", [for(i in 0...spr.frames.frames.length) i], fps, true);
617617
spr.animation.play("idle");
618618
}
619619

0 commit comments

Comments
 (0)