1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-12-29 08:16:58 +00:00

ANIMATION SHIT MORE IN PROGRESS LOL

This commit is contained in:
Cameron Taylor 2021-06-15 17:43:46 -04:00
parent 6b595165be
commit e120578642
4 changed files with 28 additions and 14 deletions

View file

@ -123,7 +123,7 @@ class TitleState extends MusicBeatState
#if FREEPLAY #if FREEPLAY
FlxG.switchState(new FreeplayState()); FlxG.switchState(new FreeplayState());
#elseif ANIMATE #elseif ANIMATE
FlxG.switchState(new CutsceneAnimTestState()); FlxG.switchState(new animate.AnimTestStage());
#elseif CHARTING #elseif CHARTING
FlxG.switchState(new ChartingState()); FlxG.switchState(new ChartingState());
/* /*

View file

@ -1,11 +1,27 @@
package animate; package animate;
import flixel.FlxSprite;
import flixel.FlxState; import flixel.FlxState;
import flixel.addons.display.FlxGridOverlay;
class AnimTestStage extends FlxState class AnimTestStage extends FlxState
{ {
override function create() override function create()
{ {
var bg:FlxSprite = FlxGridOverlay.create(32, 32);
add(bg);
var swag:FlxAnimate = new FlxAnimate(0, 0);
add(swag);
super.create(); super.create();
} }
override function update(elapsed:Float)
{
CoolUtil.mouseWheelZoom();
CoolUtil.mouseCamDrag();
super.update(elapsed);
}
} }

View file

@ -25,7 +25,7 @@ class FlxAnimate extends FlxSymbol
public function new(x:Float, y:Float) public function new(x:Float, y:Float)
{ {
var folder:String = 'tightBars'; var folder:String = 'tightBarsLol';
coolParse = cast Json.parse(Assets.getText(Paths.file('images/' + folder + '/Animation.json'))); coolParse = cast Json.parse(Assets.getText(Paths.file('images/' + folder + '/Animation.json')));
coolParse.AN.TL.L.reverse(); coolParse.AN.TL.L.reverse();
super(x, y, coolParse); super(x, y, coolParse);
@ -46,6 +46,7 @@ class FlxAnimate extends FlxSymbol
{ {
for (spr in FlxSymbol.nestedShit.get(shit)) for (spr in FlxSymbol.nestedShit.get(shit))
{ {
trace(shit);
spr.draw(); spr.draw();
} }
} }

View file

@ -38,17 +38,13 @@ class FlxSymbol extends FlxSprite
var symbolMap:Map<String, Animation> = new Map(); var symbolMap:Map<String, Animation> = new Map();
var drawQueue:Array<FlxSymbol> = [];
public var daFrame:Int = 0; public var daFrame:Int = 0;
public var nestDepth:Int = 0; public var nestDepth:Int = 0;
public var transformMatrix:Matrix = new Matrix(); public var transformMatrix:Matrix = new Matrix();
function renderFrame(TL:Timeline, coolParsed:Parsed, ?isMainLoop:Bool = false) function renderFrame(TL:Timeline, coolParsed:Parsed, ?traceShit:Bool = false)
{ {
drawQueue = [];
for (layer in TL.L) for (layer in TL.L)
{ {
// layer.FR.reverse(); // layer.FR.reverse();
@ -78,11 +74,17 @@ class FlxSymbol extends FlxSprite
// spr._matrix.concat(spr.transformMatrix); // spr._matrix.concat(spr.transformMatrix);
spr.origin.set(); spr.origin.set();
spr.origin.x += origin.x; // Prob dont need these offset thingies???
spr.origin.y += origin.y; // spr.origin.x += origin.x;
// spr.origin.y += origin.y;
spr.antialiasing = true; spr.antialiasing = true;
spr.draw(); spr.draw();
if (traceShit)
{
trace(element.ASI.N);
}
} }
else else
{ {
@ -121,11 +123,6 @@ class FlxSymbol extends FlxSprite
} }
} }
} }
// drawQueue.reverse();
//
// for (thing in drawQueue)
// thing.draw();
} }
function setDaMap(spr:FlxSymbol):Void function setDaMap(spr:FlxSymbol):Void