FINALLY FIXED ANIMATE ATLASES (update flixel-yc29)

This commit is contained in:
Yoshman29
2023-03-25 22:14:10 +01:00
parent 043fcf7151
commit c259385f2a
2 changed files with 0 additions and 20 deletions
-19
View File
@@ -9,26 +9,7 @@ import flixel.graphics.frames.FlxFrame;
import flixel.math.FlxPoint;
class FlxAnimate extends flxanimate.FlxAnimate {
public static var loadedPaths:Array<String> = [];
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)
-1
View File
@@ -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")) {