From dc4d4a825945c10836672e7ccc4147008efe23db Mon Sep 17 00:00:00 2001 From: Ishaan Bhardwaj Date: Mon, 21 Dec 2020 16:00:03 -0500 Subject: [PATCH] Credits now stops music when you exit the screen --- main.lua | 1 + scene/credits.lua | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/main.lua b/main.lua index e0f43bc..41ee9cd 100644 --- a/main.lua +++ b/main.lua @@ -129,6 +129,7 @@ function love.keypressed(key, scancode) love.window.setFullscreen(config["fullscreen"]) elseif scancode == "f2" and scene.title ~= "Input Config" and scene.title ~= "Game" then scene = InputConfigScene() + switchBGM(nil) -- secret sound playing :eyes: elseif scancode == "f8" and scene.title == "Title" then config.secret = not config.secret diff --git a/scene/credits.lua b/scene/credits.lua index 66696bb..16fd23f 100644 --- a/scene/credits.lua +++ b/scene/credits.lua @@ -12,6 +12,7 @@ function CreditsScene:update() if self.frames >= 4200 then playSE("mode_decide") scene = TitleScene() + switchBGM(nil) elseif self.frames == 3600 then fadeoutBGM(2) end @@ -53,7 +54,8 @@ end function CreditsScene:onInputPress(e) if e.input == "menu_decide" or e.scancode == "return" or e.input == "menu_back" or e.scancode == "delete" or e.scancode == "backspace" then - scene = TitleScene() + scene = TitleScene() + switchBGM(nil) end end