Weeeeee/main.lua

38 lines
919 B
Lua
Raw Normal View History

2022-03-02 18:36:52 +01:00
--load peachy
peachy = require("libs/peachy")
--load player
player = require("modules/player")
--load content_loader
local content_loader = require("modules/content_loader")
spritesheets = content_loader.spritesheets
sound_effects = content_loader.sound_effects
backgrounds = content_loader.backgrounds
music = content_loader.music
--load globals
local globals = require("modules/globals")
local game = globals.game
--load draw_callback
draw_mod = require("modules/draw_callback")
local draw_callback = draw_mod.draw
local drawerinit = draw_mod.drawerinit
--load update_callback
update_mod = require("modules/update_callback")
local update_callback = update_mod.update
local updateinit = update_mod.updateinit
drawerinit(spritesheets, player, game)
updateinit(game)
player:init(sound_effects, spritesheets, game)
function love.draw()
draw_callback()
end
function love.update(dt)
update_callback(dt)
end