~kmdodrill/ghost-simulator

69b44645d9109715219ccd7d6bdbc278bae97f7a — Kenneth Dodrill 6 months ago 673c41a
Add end menu
2 files changed, 20 insertions(+), 0 deletions(-)

M src/sceneManager.lua
A src/scenes/endMenu.lua
M src/sceneManager.lua => src/sceneManager.lua +1 -0
@@ 13,6 13,7 @@ require 'src.scenes.work'
require 'src.scenes.drink'
require 'src.scenes.taxes'
require 'src.scenes.actualTaxes'
require 'src.scenes.endMenu'

SceneManager = {}


A src/scenes/endMenu.lua => src/scenes/endMenu.lua +19 -0
@@ 0,0 1,19 @@
EndMenu = {}

function EndMenu.load()
    Sound.setMusic("assets/music/creepy-music-box.wav")
    return {
        title = love.graphics.newText(DefaultFont, "See the credits"),
        timer = true,
        graphics = {
            Graphic.create("assets/sprites/end-menu.png"),
        },
        cursor = false,
    }
end

function EndMenu.update(dt)
    if love.timer.getTime() - Timer > 15 then
        love.event.quit(0)
    end
end