mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-22 12:59:02 -06:00
Credits now stops music when you exit the screen
This commit is contained in:
parent
565510c7b2
commit
dc4d4a8259
1
main.lua
1
main.lua
@ -129,6 +129,7 @@ function love.keypressed(key, scancode)
|
|||||||
love.window.setFullscreen(config["fullscreen"])
|
love.window.setFullscreen(config["fullscreen"])
|
||||||
elseif scancode == "f2" and scene.title ~= "Input Config" and scene.title ~= "Game" then
|
elseif scancode == "f2" and scene.title ~= "Input Config" and scene.title ~= "Game" then
|
||||||
scene = InputConfigScene()
|
scene = InputConfigScene()
|
||||||
|
switchBGM(nil)
|
||||||
-- secret sound playing :eyes:
|
-- secret sound playing :eyes:
|
||||||
elseif scancode == "f8" and scene.title == "Title" then
|
elseif scancode == "f8" and scene.title == "Title" then
|
||||||
config.secret = not config.secret
|
config.secret = not config.secret
|
||||||
|
@ -12,6 +12,7 @@ function CreditsScene:update()
|
|||||||
if self.frames >= 4200 then
|
if self.frames >= 4200 then
|
||||||
playSE("mode_decide")
|
playSE("mode_decide")
|
||||||
scene = TitleScene()
|
scene = TitleScene()
|
||||||
|
switchBGM(nil)
|
||||||
elseif self.frames == 3600 then
|
elseif self.frames == 3600 then
|
||||||
fadeoutBGM(2)
|
fadeoutBGM(2)
|
||||||
end
|
end
|
||||||
@ -53,7 +54,8 @@ end
|
|||||||
function CreditsScene:onInputPress(e)
|
function CreditsScene:onInputPress(e)
|
||||||
if e.input == "menu_decide" or e.scancode == "return" or
|
if e.input == "menu_decide" or e.scancode == "return" or
|
||||||
e.input == "menu_back" or e.scancode == "delete" or e.scancode == "backspace" then
|
e.input == "menu_back" or e.scancode == "delete" or e.scancode == "backspace" then
|
||||||
scene = TitleScene()
|
scene = TitleScene()
|
||||||
|
switchBGM(nil)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user