Skip to content

Commit

Permalink
death from cruelty squad
Browse files Browse the repository at this point in the history
  • Loading branch information
x8c8r committed Jun 26, 2024
1 parent d35867d commit 5e792aa
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
Binary file modified assets/shared/music/gameOver.ogg
Binary file not shown.
Binary file modified assets/shared/music/gameOverEnd.ogg
Binary file not shown.
22 changes: 13 additions & 9 deletions source/GameOverSubstate.hx
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,18 @@ class GameOverSubstate extends MusicBeatSubstate
add(camFollow);

FlxG.sound.play(Paths.sound('fnf_loss_sfx' + stageSuffix));
Conductor.changeBPM(100);
Conductor.changeBPM(85);

// FlxG.camera.followLerp = 1;
// FlxG.camera.focusOn(FlxPoint.get(FlxG.width / 2, FlxG.height / 2));
FlxG.camera.scroll.set();
FlxG.camera.target = null;

bf.playAnim('firstDeath');

new FlxTimer().start(2, (tmr:FlxTimer) -> {
FlxG.sound.playMusic(Paths.music('gameOver' + stageSuffix));
});
}

override function update(elapsed:Float)
Expand All @@ -70,15 +74,15 @@ class GameOverSubstate extends MusicBeatSubstate
FlxG.switchState(new FreeplayState());
}

if (bf.animation.curAnim.name == 'firstDeath' && bf.animation.curAnim.curFrame == 12)
{
FlxG.camera.follow(camFollow, LOCKON, 0.01);
}
// if (bf.animation.curAnim.name == 'firstDeath' && bf.animation.curAnim.curFrame == 12)
// {
// FlxG.camera.follow(camFollow, LOCKON, 0.01);
// }

if (bf.animation.curAnim.name == 'firstDeath' && bf.animation.curAnim.finished)
{
FlxG.sound.playMusic(Paths.music('gameOver' + stageSuffix));
}
// if (bf.animation.curAnim.name == 'firstDeath' && bf.animation.curAnim.finished)
// {
// FlxG.sound.playMusic(Paths.music('gameOver' + stageSuffix));
// }

if (FlxG.sound.music.playing)
{
Expand Down

0 comments on commit 5e792aa

Please sign in to comment.