mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-30 11:26:53 -05:00
guns and animation shit in progress
This commit is contained in:
parent
75c1cbdbd3
commit
3b4129921c
2 changed files with 30 additions and 4 deletions
|
@ -39,6 +39,19 @@ class FlxAnimate extends FlxSymbol
|
||||||
super.draw();
|
super.draw();
|
||||||
|
|
||||||
renderFrame(coolParse.AN.TL, coolParse, true);
|
renderFrame(coolParse.AN.TL, coolParse, true);
|
||||||
|
|
||||||
|
if (FlxG.keys.justPressed.E)
|
||||||
|
{
|
||||||
|
for (shit in FlxSymbol.nestedShit.keys())
|
||||||
|
{
|
||||||
|
for (spr in FlxSymbol.nestedShit.get(shit))
|
||||||
|
{
|
||||||
|
spr.draw();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FlxSymbol.nestedShit.clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var curFrame:Int = 0;
|
var curFrame:Int = 0;
|
||||||
|
|
|
@ -29,6 +29,8 @@ class FlxSymbol extends FlxSprite
|
||||||
super.draw();
|
super.draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static var nestedShit:Map<Int, Array<FlxSymbol>> = new Map();
|
||||||
|
|
||||||
var swagX:Float = 0;
|
var swagX:Float = 0;
|
||||||
var swagY:Float = 0;
|
var swagY:Float = 0;
|
||||||
|
|
||||||
|
@ -37,6 +39,7 @@ class FlxSymbol extends FlxSprite
|
||||||
var drawQueue:Array<FlxSymbol> = [];
|
var drawQueue:Array<FlxSymbol> = [];
|
||||||
|
|
||||||
public var daFrame:Int = 0;
|
public var daFrame:Int = 0;
|
||||||
|
public var nestDepth:Int = 0;
|
||||||
|
|
||||||
function renderFrame(TL:Timeline, coolParsed:Parsed, ?isMainLoop:Bool = false)
|
function renderFrame(TL:Timeline, coolParsed:Parsed, ?isMainLoop:Bool = false)
|
||||||
{
|
{
|
||||||
|
@ -97,8 +100,9 @@ class FlxSymbol extends FlxSprite
|
||||||
|
|
||||||
// spr._matrix.setTo(m3d[0], m3d[1], m3d[4], m3d[5], m3d[12], m3d[13]);
|
// spr._matrix.setTo(m3d[0], m3d[1], m3d[4], m3d[5], m3d[12], m3d[13]);
|
||||||
|
|
||||||
drawQueue.push(spr);
|
// drawQueue.push(spr);
|
||||||
// spr.draw();
|
|
||||||
|
setDaMap(spr);
|
||||||
|
|
||||||
// swagX = 0;
|
// swagX = 0;
|
||||||
}
|
}
|
||||||
|
@ -138,6 +142,7 @@ class FlxSymbol extends FlxSprite
|
||||||
// nestedShit.oldMatrix = element.SI.M3D;
|
// nestedShit.oldMatrix = element.SI.M3D;
|
||||||
|
|
||||||
nestedShit.hasFrameByPass = true;
|
nestedShit.hasFrameByPass = true;
|
||||||
|
nestedShit.nestDepth = nestDepth + 1;
|
||||||
nestedShit.renderFrame(nestedSymbol.TL, coolParsed);
|
nestedShit.renderFrame(nestedSymbol.TL, coolParsed);
|
||||||
|
|
||||||
// renderFrame(nestedSymbol.TL, coolParsed);
|
// renderFrame(nestedSymbol.TL, coolParsed);
|
||||||
|
@ -149,8 +154,16 @@ class FlxSymbol extends FlxSprite
|
||||||
|
|
||||||
// drawQueue.reverse();
|
// drawQueue.reverse();
|
||||||
//
|
//
|
||||||
for (thing in drawQueue)
|
// for (thing in drawQueue)
|
||||||
thing.draw();
|
// thing.draw();
|
||||||
|
}
|
||||||
|
|
||||||
|
function setDaMap(spr:FlxSymbol):Void
|
||||||
|
{
|
||||||
|
if (!nestedShit.exists(nestDepth))
|
||||||
|
nestedShit.set(nestDepth, [spr]);
|
||||||
|
else
|
||||||
|
nestedShit.get(nestDepth).push(spr);
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeFrame(frameChange:Int = 0):Void
|
function changeFrame(frameChange:Int = 0):Void
|
||||||
|
|
Loading…
Reference in a new issue