cambridge/scene/credits.lua

91 lines
3.2 KiB
Lua
Raw Permalink Normal View History

2020-12-20 09:28:34 -06:00
local CreditsScene = Scene:extend()
CreditsScene.title = "Credits"
function CreditsScene:new()
self.frames = 0
2021-07-05 21:09:06 -05:00
-- higher = slower
2021-08-19 13:15:57 -05:00
self.scroll_speed = 1.85
2020-12-21 14:48:34 -06:00
switchBGM("credit_roll", "gm3")
DiscordRPC:update({
details = "Watching the credits",
state = "Thanks for playing the game!",
largeImageKey = "ingame-1900",
})
2020-12-20 09:28:34 -06:00
end
function CreditsScene:update()
if love.window.hasFocus() then
self.frames = self.frames + 1
end
2021-07-05 21:09:06 -05:00
if self.frames >= 2100 * self.scroll_speed then
2020-12-20 09:28:34 -06:00
playSE("mode_decide")
scene = TitleScene()
switchBGM(nil)
2021-07-05 21:09:06 -05:00
elseif self.frames == math.floor(1950 * self.scroll_speed) then
2020-12-21 14:48:34 -06:00
fadeoutBGM(2)
2020-12-20 09:28:34 -06:00
end
end
function CreditsScene:render()
2021-07-05 21:09:06 -05:00
local offset = self.frames / self.scroll_speed
2020-12-20 09:28:34 -06:00
love.graphics.setColor(1, 1, 1, 1)
love.graphics.draw(
backgrounds[19],
0, 0, 0,
0.5, 0.5
)
love.graphics.setFont(font_3x5_4)
2021-07-05 21:09:06 -05:00
love.graphics.print("Cambridge Credits", 320, 500 - offset)
love.graphics.print("THANK YOU\nFOR PLAYING!", 320, math.max(2050 - offset, 240))
2020-12-20 09:28:34 -06:00
love.graphics.setFont(font_3x5_3)
2021-07-05 21:09:06 -05:00
love.graphics.print("Game Developers", 320, 550 - offset)
love.graphics.print("Project Heads", 320, 640 - offset)
love.graphics.print("Notable Game Developers", 320, 750 - offset)
love.graphics.print("Special Thanks", 320, 1020 - offset)
love.graphics.print("- Milla", 320, math.max(2130 - offset, 320))
2020-12-20 09:28:34 -06:00
love.graphics.setFont(font_3x5_2)
2021-07-05 21:09:06 -05:00
love.graphics.print("Oshisaure\nJoe Zeng", 320, 590 - offset)
love.graphics.print("Mizu\nMarkGamed\nHailey", 320, 680 - offset)
2021-03-28 09:03:27 -05:00
love.graphics.print(
2021-09-26 09:26:35 -05:00
"2Tie - TGMsim\nAxel Fox - Multimino\nDr Ocelot - Tetra Legends\n" ..
2021-07-05 21:09:06 -05:00
"Electra - ZTrix\nFelicity/nightmareci/kdex - Shiromino\n" ..
"Mine - Tetra Online\nMrZ - Techmino\nosk - TETR.IO\n" ..
"Phoenix Flare - Master of Blocks\nRayRay26 - Spirit Drop\n" ..
2021-08-19 13:15:57 -05:00
"Rin - Puzzle Trial\nsinefuse - stackfuse",
320, 790 - offset
2021-03-28 09:03:27 -05:00
)
2020-12-20 09:28:34 -06:00
love.graphics.print(
2021-07-05 21:09:06 -05:00
"321MrHaatz\nAdventium\nAgentBasey\nArchina\nAurora\n" ..
2021-06-14 22:53:14 -05:00
"Caithness\nCheez\ncolour_thief\nCommando\nCublex\n" ..
2021-07-05 21:09:06 -05:00
"CylinderKnot\neightsixfivezero\nEricICX\nGesomaru\n" ..
2021-06-14 22:53:14 -05:00
"gizmo4487\nJBroms\nKirby703\nKitaru\n" ..
"M1ssing0\nMattMayuga\nMyPasswordIsWeak\n" ..
2021-07-05 21:09:06 -05:00
"Nikki Karissa\noffwo\nOliver\nPineapple\npokemonfan1937\n" ..
"Pyra Neoxi\nRDST64\nRocketLanterns\nRustyFoxxo\n" ..
"saphie\nShelleloch\nSimon\nstratus\nSuper302\n" ..
"switchpalacecorner\nterpyderp\nTetrian22\nTetro48\nThatCookie\n" ..
2021-06-14 22:53:14 -05:00
"TimmSkiller\nTrixciel\nuser74003\nZaptorZap\nZircean\n" ..
2021-07-05 21:09:06 -05:00
"All other contributors and friends!\nThe Absolute PLUS Discord\n" ..
"Tetra Legends Discord\nTetra Online Discord\nMultimino Discord\n" ..
"Hard Drop Discord\nRusty's Systemspace\nCambridge Discord\n" ..
2021-02-28 17:40:53 -06:00
"And to you, the player!",
320, 1060 - offset
2020-12-20 09:28:34 -06:00
)
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()
switchBGM(nil)
2020-12-20 09:28:34 -06:00
end
end
return CreditsScene