mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-22 08:39:03 -06:00
Added fitting menu sfx
This commit is contained in:
parent
4cb20101b0
commit
629beb7240
@ -10,6 +10,10 @@ sounds = {
|
||||
},
|
||||
move = love.audio.newSource("res/se/move.wav", "static"),
|
||||
bottom = love.audio.newSource("res/se/bottom.wav", "static"),
|
||||
cursor = love.audio.newSource("res/se/cursor.wav", "static"),
|
||||
cursor_lr = love.audio.newSource("res/se/cursor_lr.wav", "static"),
|
||||
main_decide = love.audio.newSource("res/se/main_decide.wav", "static"),
|
||||
mode_decide = love.audio.newSource("res/se/mode_decide.wav", "static"),
|
||||
}
|
||||
|
||||
function playSE(sound, subsound)
|
||||
|
BIN
res/se/cursor.wav
Normal file
BIN
res/se/cursor.wav
Normal file
Binary file not shown.
BIN
res/se/cursor_lr.wav
Normal file
BIN
res/se/cursor_lr.wav
Normal file
Binary file not shown.
BIN
res/se/main_decide.wav
Normal file
BIN
res/se/main_decide.wav
Normal file
Binary file not shown.
BIN
res/se/mode_decide.wav
Normal file
BIN
res/se/mode_decide.wav
Normal file
Binary file not shown.
@ -92,15 +92,19 @@ function ModeSelectScene:onKeyPress(e)
|
||||
current_ruleset = self.menu_state.ruleset
|
||||
config.current_mode = current_mode
|
||||
config.current_ruleset = current_ruleset
|
||||
playSE("mode_decide")
|
||||
saveConfig()
|
||||
scene = GameScene(game_modes[self.menu_state.mode], rulesets[self.menu_state.ruleset])
|
||||
elseif (e.scancode == config.input["up"] or e.scancode == "up") and e.isRepeat == false then
|
||||
self:changeOption(-1)
|
||||
playSE("cursor")
|
||||
elseif (e.scancode == config.input["down"] or e.scancode == "down") and e.isRepeat == false then
|
||||
self:changeOption(1)
|
||||
playSE("cursor")
|
||||
elseif (e.scancode == config.input["left"] or e.scancode == "left") or
|
||||
(e.scancode == config.input["right"] or e.scancode == "right") then
|
||||
self:switchSelect()
|
||||
playSE("cursor_lr")
|
||||
elseif e.scancode == "escape" then
|
||||
scene = TitleScene()
|
||||
end
|
||||
|
@ -39,11 +39,14 @@ end
|
||||
|
||||
function TitleScene:onKeyPress(e)
|
||||
if e.scancode == "return" and e.isRepeat == false then
|
||||
playSE("main_decide")
|
||||
scene = main_menu_screens[self.main_menu_state]()
|
||||
elseif (e.scancode == config.input["up"] or e.scancode == "up") and e.isRepeat == false then
|
||||
self:changeOption(-1)
|
||||
playSE("cursor")
|
||||
elseif (e.scancode == config.input["down"] or e.scancode == "down") and e.isRepeat == false then
|
||||
self:changeOption(1)
|
||||
playSE("cursor")
|
||||
elseif e.scancode == "escape" and e.isRepeat == false then
|
||||
love.event.quit()
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user