Funkin/source/animate/AnimTestStage.hx

37 lines
643 B
Haxe
Raw Normal View History

2021-06-14 19:36:56 -04:00
package animate;
2021-06-15 17:43:46 -04:00
import flixel.FlxSprite;
2021-06-14 19:36:56 -04:00
import flixel.FlxState;
2021-06-15 17:43:46 -04:00
import flixel.addons.display.FlxGridOverlay;
2021-06-14 19:36:56 -04:00
class AnimTestStage extends FlxState
{
2021-08-19 14:53:18 -04:00
var tl:AnimateTimeline;
var swag:FlxAnimate;
2021-06-14 19:36:56 -04:00
override function create()
{
2021-06-15 17:43:46 -04:00
var bg:FlxSprite = FlxGridOverlay.create(32, 32);
add(bg);
2021-06-15 21:15:06 -04:00
bg.scrollFactor.set();
2021-06-15 17:43:46 -04:00
2021-08-19 14:53:18 -04:00
swag = new FlxAnimate(200, 200);
2021-06-15 17:43:46 -04:00
add(swag);
2021-08-19 14:53:18 -04:00
tl = new AnimateTimeline(Paths.file('images/tightBarsLol/Animation.json'));
add(tl);
2021-06-14 19:36:56 -04:00
super.create();
}
2021-06-15 17:43:46 -04:00
override function update(elapsed:Float)
{
2021-08-19 14:53:18 -04:00
tl.curFrame = swag.daFrame;
2021-06-15 17:43:46 -04:00
CoolUtil.mouseWheelZoom();
CoolUtil.mouseCamDrag();
super.update(elapsed);
}
2021-06-14 19:36:56 -04:00
}