From 72ae46a8486ac74475cb38cf22d44c1b3c416aa0 Mon Sep 17 00:00:00 2001 From: M&M Date: Mon, 5 Jul 2021 20:29:45 -0700 Subject: [PATCH 1/3] pause results music when game isn't focused --- source/ResultsScreen.hx | 1 + 1 file changed, 1 insertion(+) diff --git a/source/ResultsScreen.hx b/source/ResultsScreen.hx index 255ab8c..d48a231 100644 --- a/source/ResultsScreen.hx +++ b/source/ResultsScreen.hx @@ -57,6 +57,7 @@ class ResultsScreen extends FlxSubState music = new FlxSound().loadEmbedded(Paths.music('breakfast'), true, true); music.volume = 0; music.play(false, FlxG.random.int(0, Std.int(music.length / 2))); + FlxG.sound.list.add(music); background.alpha = 0; From 1ab0d2cb00725336313f0fa03b564632d48a283b Mon Sep 17 00:00:00 2001 From: M&M Date: Mon, 5 Jul 2021 20:29:56 -0700 Subject: [PATCH 2/3] make logo bump on beat --- source/TitleState.hx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/source/TitleState.hx b/source/TitleState.hx index f716247..0651cbd 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -165,8 +165,7 @@ class TitleState extends MusicBeatState logoBl = new FlxSprite(-150, 1500); logoBl.frames = Paths.getSparrowAtlas('KadeEngineLogoBumpin'); logoBl.antialiasing = true; - logoBl.animation.addByPrefix('bump', 'logo bumpin', 24); - logoBl.animation.play('bump'); + logoBl.animation.addByPrefix('bump', 'logo bumpin', 24, false); logoBl.updateHitbox(); // logoBl.screenCenter(); // logoBl.color = FlxColor.BLACK; @@ -174,8 +173,7 @@ class TitleState extends MusicBeatState logoBl = new FlxSprite(-150, -100); logoBl.frames = Paths.getSparrowAtlas('logoBumpin'); logoBl.antialiasing = true; - logoBl.animation.addByPrefix('bump', 'logo bumpin', 24); - logoBl.animation.play('bump'); + logoBl.animation.addByPrefix('bump', 'logo bumpin', 24, false); logoBl.updateHitbox(); // logoBl.screenCenter(); // logoBl.color = FlxColor.BLACK; @@ -378,7 +376,7 @@ class TitleState extends MusicBeatState { super.beatHit(); - logoBl.animation.play('bump'); + logoBl.animation.play('bump', true); danceLeft = !danceLeft; if (danceLeft) From a2c4b3e0b609b25a7d9ad0c458954ad9c7056e2c Mon Sep 17 00:00:00 2001 From: M&M Date: Mon, 5 Jul 2021 20:53:10 -0700 Subject: [PATCH 3/3] pause now goes to whatever menu you were last on --- source/PauseSubState.hx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/PauseSubState.hx b/source/PauseSubState.hx index f2e3a0b..0d78ca9 100644 --- a/source/PauseSubState.hx +++ b/source/PauseSubState.hx @@ -240,7 +240,10 @@ class PauseSubState extends MusicBeatSubstate if (FlxG.save.data.fpsCap > 290) (cast (Lib.current.getChildAt(0), Main)).setFPSCap(290); - FlxG.switchState(new MainMenuState()); + if (PlayState.isStoryMode) + FlxG.switchState(new StoryMenuState()); + else + FlxG.switchState(new FreeplayState()); } }