A little easter egg...

This commit is contained in:
Ishaan Bhardwaj 2020-12-19 20:31:14 -05:00
parent bcb44725bf
commit e26b094830
4 changed files with 15 additions and 0 deletions

View File

@ -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)

View File

@ -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

Binary file not shown.

View File

@ -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,