mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-12-22 12:49:01 -06:00
A festive easter egg has arrived! (v0.2.6.1)
Good luck hunting for the egg!
This commit is contained in:
parent
083693496e
commit
e3b038b5a7
@ -20,6 +20,7 @@ backgrounds = {
|
||||
love.graphics.newImage("res/backgrounds/1800.png"),
|
||||
love.graphics.newImage("res/backgrounds/1900.png"),
|
||||
title = love.graphics.newImage("res/backgrounds/title.png"),
|
||||
snow = love.graphics.newImage("res/backgrounds/snow.png"),
|
||||
input_config = love.graphics.newImage("res/backgrounds/options-input.png"),
|
||||
game_config = love.graphics.newImage("res/backgrounds/options-game.png"),
|
||||
}
|
||||
@ -84,4 +85,5 @@ misc_graphics = {
|
||||
go = love.graphics.newImage("res/img/go.png"),
|
||||
select_mode = love.graphics.newImage("res/img/select_mode.png"),
|
||||
strike = love.graphics.newImage("res/img/strike.png"),
|
||||
santa = love.graphics.newImage("res/img/santa.png")
|
||||
}
|
BIN
res/backgrounds/snow.png
Normal file
BIN
res/backgrounds/snow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 MiB |
BIN
res/bgm/non-loop.ogg
Normal file
BIN
res/bgm/non-loop.ogg
Normal file
Binary file not shown.
BIN
res/bgm/non-start.ogg
Normal file
BIN
res/bgm/non-start.ogg
Normal file
Binary file not shown.
BIN
res/img/santa.png
Normal file
BIN
res/img/santa.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 75 KiB |
@ -27,6 +27,11 @@ local mainmenuidle = {
|
||||
|
||||
function TitleScene:new()
|
||||
self.main_menu_state = 1
|
||||
self.frames = 0
|
||||
self.snow_bg_opacity = 0
|
||||
self.y_offset = 0
|
||||
self.text = ""
|
||||
self.text_flag = false
|
||||
DiscordRPC:update({
|
||||
details = "In menus",
|
||||
state = mainmenuidle[math.random(#mainmenuidle)],
|
||||
@ -34,17 +39,39 @@ function TitleScene:new()
|
||||
end
|
||||
|
||||
function TitleScene:update()
|
||||
if self.text_flag then
|
||||
self.frames = self.frames + 1
|
||||
self.snow_bg_opacity = self.snow_bg_opacity + 0.01
|
||||
end
|
||||
if self.frames < 125 then self.y_offset = self.frames
|
||||
elseif self.frames < 185 then self.y_offset = 125
|
||||
else self.y_offset = 310 - self.frames end
|
||||
end
|
||||
|
||||
function TitleScene:render()
|
||||
love.graphics.setFont(font_3x5_2)
|
||||
|
||||
love.graphics.setColor(1, 1, 1, 1 - self.snow_bg_opacity)
|
||||
love.graphics.draw(
|
||||
backgrounds["title"],
|
||||
0, 0, 0,
|
||||
0.5, 0.5
|
||||
)
|
||||
|
||||
love.graphics.setColor(1, 1, 1, self.snow_bg_opacity)
|
||||
love.graphics.draw(
|
||||
backgrounds["snow"],
|
||||
0, 0, 0,
|
||||
0.5, 0.5
|
||||
)
|
||||
|
||||
love.graphics.draw(
|
||||
misc_graphics["santa"],
|
||||
400, -205 + self.y_offset,
|
||||
0, 0.5, 0.5
|
||||
)
|
||||
love.graphics.print("Happy Holidays!", 320, -100 + self.y_offset)
|
||||
|
||||
love.graphics.print(self.restart_message and "Restart Cambridge..." or "", 0, 0)
|
||||
|
||||
love.graphics.setColor(1, 1, 1, 0.5)
|
||||
@ -74,6 +101,11 @@ function TitleScene:onInputPress(e)
|
||||
playSE("cursor")
|
||||
elseif e.input == "menu_back" or e.scancode == "backspace" or e.scancode == "delete" then
|
||||
love.event.quit()
|
||||
else
|
||||
self.text = self.text .. e.scancode
|
||||
if self.text == "ffffff" then
|
||||
self.text_flag = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user