flashing lights + old code updated with new asset path system

This commit is contained in:
CyndaquilDAC
2021-05-05 16:33:16 -05:00
parent 7ccf634c15
commit f55014839e
7 changed files with 63 additions and 30 deletions

View File

@ -23,12 +23,12 @@ class GameOverState extends FlxTransitionableState
override function create()
{
/* var loser:FlxSprite = new FlxSprite(100, 100);
var loseTex = FlxAtlasFrames.fromSparrow(AssetPaths.lose.png, AssetPaths.lose.xml);
var loser:FlxSprite = new FlxSprite(100, 100);
var loseTex = Paths.getSparrowAtlas('lose');
loser.frames = loseTex;
loser.animation.addByPrefix('lose', 'lose', 24, false);
loser.animation.play('lose');
// add(loser); */
add(loser);
var bf:Boyfriend = new Boyfriend(bfX, bfY);
// bf.scrollFactor.set();
@ -36,18 +36,18 @@ class GameOverState extends FlxTransitionableState
bf.playAnim('firstDeath');
FlxG.camera.follow(bf, LOCKON, 0.001);
/*
var restart:FlxSprite = new FlxSprite(500, 50).loadGraphic(AssetPaths.restart.png);
var restart:FlxSprite = new FlxSprite(500, 50).loadGraphic(Paths.image('restart'));
restart.setGraphicSize(Std.int(restart.width * 0.6));
restart.updateHitbox();
restart.alpha = 0;
restart.antialiasing = true;
// add(restart); */
add(restart);
FlxG.sound.music.fadeOut(2, FlxG.sound.music.volume * 0.6);
// FlxTween.tween(restart, {alpha: 1}, 1, {ease: FlxEase.quartInOut});
// FlxTween.tween(restart, {y: restart.y + 40}, 7, {ease: FlxEase.quartInOut, type: PINGPONG});
FlxTween.tween(restart, {alpha: 1}, 1, {ease: FlxEase.quartInOut});
FlxTween.tween(restart, {y: restart.y + 40}, 7, {ease: FlxEase.quartInOut, type: PINGPONG});
super.create();
}