From cb11c78c26caf6684cf5a2334daf44903ad84540 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sun, 1 Nov 2020 00:58:20 -0700 Subject: [PATCH] RELEASE SHIIIT --- source/FreeplayState.hx | 3 +++ source/GameOverSubstate.hx | 12 +++++++++++- source/StoryMenuState.hx | 3 +++ source/TitleState.hx | 2 ++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx index 6fa3f6357..ecdf81edf 100644 --- a/source/FreeplayState.hx +++ b/source/FreeplayState.hx @@ -17,6 +17,9 @@ class FreeplayState extends MusicBeatState override function create() { + if (!FlxG.sound.music.playing) + FlxG.sound.playMusic('assets/music/freakyMenu' + TitleState.soundExt); + if (StoryMenuState.weekUnlocked[1]) { songs.push('Spookeez'); diff --git a/source/GameOverSubstate.hx b/source/GameOverSubstate.hx index 1a7d89d58..e07074ec8 100644 --- a/source/GameOverSubstate.hx +++ b/source/GameOverSubstate.hx @@ -39,11 +39,21 @@ class GameOverSubstate extends MusicBeatSubstate { super.update(elapsed); - if (FlxG.keys.justPressed.ENTER) + if (controls.ACCEPT) { endBullshit(); } + if (controls.BACK) + { + FlxG.sound.music.stop(); + + if (PlayState.isStoryMode) + FlxG.switchState(new StoryMenuState()); + else + FlxG.switchState(new FreeplayState()); + } + if (bf.animation.curAnim.name == 'firstDeath' && bf.animation.curAnim.curFrame == 12) { FlxG.camera.follow(camFollow, LOCKON, 0.01); diff --git a/source/StoryMenuState.hx b/source/StoryMenuState.hx index 11017aff1..d88ab4833 100644 --- a/source/StoryMenuState.hx +++ b/source/StoryMenuState.hx @@ -38,6 +38,9 @@ class StoryMenuState extends MusicBeatState override function create() { + if (!FlxG.sound.music.playing) + FlxG.sound.playMusic('assets/music/freakyMenu' + TitleState.soundExt); + persistentUpdate = persistentDraw = true; scoreText = new FlxText(10, 10, 0, "SCORE: 49324858", 36); diff --git a/source/TitleState.hx b/source/TitleState.hx index e84df9de1..58611fdc6 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -162,6 +162,8 @@ class TitleState extends MusicBeatState FlxTween.tween(credTextShit, {y: credTextShit.y + 20}, 2.9, {ease: FlxEase.quadInOut, type: PINGPONG}); + FlxG.mouse.visible = false; + if (initialized) skipIntro(); else