From c259385f2a52b2f7f3af8dfabb65ee51c819897c Mon Sep 17 00:00:00 2001 From: Yoshman29 <81191621+YoshiCrafter29@users.noreply.github.com> Date: Sat, 25 Mar 2023 22:14:10 +0100 Subject: [PATCH] FINALLY FIXED ANIMATE ATLASES (update flixel-yc29) --- source/funkin/system/FlxAnimate.hx | 19 ------------------- source/funkin/system/Main.hx | 1 - 2 files changed, 20 deletions(-) diff --git a/source/funkin/system/FlxAnimate.hx b/source/funkin/system/FlxAnimate.hx index 3c9ccd22..b9e70574 100644 --- a/source/funkin/system/FlxAnimate.hx +++ b/source/funkin/system/FlxAnimate.hx @@ -9,26 +9,7 @@ import flixel.graphics.frames.FlxFrame; import flixel.math.FlxPoint; class FlxAnimate extends flxanimate.FlxAnimate { - public static var loadedPaths:Array = []; - public override function loadAtlas(Path:String) { - super.loadAtlas(Path); - loadedPaths.push(Path); - } - public static function init() { - FlxG.signals.preStateSwitch.add(onSwitch); - } - - public override function destroy() { - FlxG.bitmap.remove(graphic); - super.destroy(); - } - - private static function onSwitch() { - for(p in loadedPaths) { - Assets.cache.clear(p); - } - } override function drawLimb(limb:FlxFrame, _matrix:FlxMatrix, ?colorTransform:ColorTransform) { if (alpha == 0 || colorTransform != null && (colorTransform.alphaMultiplier == 0 || colorTransform.alphaOffset == -255) || limb == null || limb.type == EMPTY) diff --git a/source/funkin/system/Main.hx b/source/funkin/system/Main.hx index e42c26ca..847641a9 100644 --- a/source/funkin/system/Main.hx +++ b/source/funkin/system/Main.hx @@ -164,7 +164,6 @@ class Main extends Sprite #if GLOBAL_SCRIPT funkin.scripting.GlobalScript.init(); #end - funkin.system.FlxAnimate.init(); #if sys if (startedFromSource = Sys.args().contains("-livereload")) {