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