Weeeeee/modules/globals.lua

25 lines
738 B
Lua
Raw Normal View History

2022-03-02 18:36:52 +01:00
local game = {}
game.debug = true
game.width = 1024
game.height = 768
game.title = "Weeeeeeeee"
game.version = "0.0.1"
game.fullscreen = false
game.level = 1
2022-03-02 20:31:33 +01:00
game.level_count = 1
game.levels = {}
game.getcurlevel = function(self)
return self.levels[self.level]
end
for i = 1, game.level_count, 1 do
game.levels[i] = {}
game.levels[i].background = love.graphics.newImage("assets/images/backgrounds/level".. i .."_hires.png")
game.levels[i].width = game.levels[i].background:getWidth()
game.levels[i].height = game.levels[i].background:getHeight()
game.levels[i].music = love.audio.newSource("assets/audio/music/track".. i ..".ogg", "static")
game.levels[i].music:setLooping(true)
end
2022-03-02 18:36:52 +01:00
return {
game = game
}