mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-22 13:09:02 -06:00
A little easter egg...
This commit is contained in:
parent
bcb44725bf
commit
e26b094830
@ -22,6 +22,8 @@ sounds = {
|
|||||||
go = love.audio.newSource("res/se/go.wav", "static"),
|
go = love.audio.newSource("res/se/go.wav", "static"),
|
||||||
irs = love.audio.newSource("res/se/irs.wav", "static"),
|
irs = love.audio.newSource("res/se/irs.wav", "static"),
|
||||||
ihs = love.audio.newSource("res/se/ihs.wav", "static"),
|
ihs = love.audio.newSource("res/se/ihs.wav", "static"),
|
||||||
|
-- a secret sound!
|
||||||
|
welcome = love.audio.newSource("res/se/welcomeToCambridge.wav", "static"),
|
||||||
}
|
}
|
||||||
|
|
||||||
function playSE(sound, subsound)
|
function playSE(sound, subsound)
|
||||||
|
11
main.lua
11
main.lua
@ -15,6 +15,9 @@ function love.load()
|
|||||||
|
|
||||||
love.window.setMode(love.graphics.getWidth(), love.graphics.getHeight(), {resizable = true});
|
love.window.setMode(love.graphics.getWidth(), love.graphics.getHeight(), {resizable = true});
|
||||||
|
|
||||||
|
if config.secret == nil then config.secret = false
|
||||||
|
elseif config.secret == true then playSE("welcome") end
|
||||||
|
|
||||||
if not config.das then config.das = 10 end
|
if not config.das then config.das = 10 end
|
||||||
if not config.arr then config.arr = 2 end
|
if not config.arr then config.arr = 2 end
|
||||||
|
|
||||||
@ -124,6 +127,14 @@ 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()
|
||||||
|
-- secret sound playing :eyes:
|
||||||
|
elseif scancode == "f8" and scene.title == "Title" then
|
||||||
|
config.secret = not config.secret
|
||||||
|
saveConfig()
|
||||||
|
love.graphics.setFont(font_3x5_2)
|
||||||
|
love.graphics.print("Restart Cambridge...", 0, 450)
|
||||||
|
if config.secret then playSE("mode_decide")
|
||||||
|
else playSE("erase") end
|
||||||
-- function keys are reserved
|
-- function keys are reserved
|
||||||
elseif string.match(scancode, "^f[1-9]$") or string.match(scancode, "^f[1-9][0-9]+$") then
|
elseif string.match(scancode, "^f[1-9]$") or string.match(scancode, "^f[1-9][0-9]+$") then
|
||||||
return
|
return
|
||||||
|
BIN
res/se/welcomeToCambridge.wav
Normal file
BIN
res/se/welcomeToCambridge.wav
Normal file
Binary file not shown.
@ -1,5 +1,7 @@
|
|||||||
local TitleScene = Scene:extend()
|
local TitleScene = Scene:extend()
|
||||||
|
|
||||||
|
TitleScene.title = "Title"
|
||||||
|
|
||||||
local main_menu_screens = {
|
local main_menu_screens = {
|
||||||
ModeSelectScene,
|
ModeSelectScene,
|
||||||
InputConfigScene,
|
InputConfigScene,
|
||||||
|
Loading…
Reference in New Issue
Block a user