Weeeeee/main.lua

43 lines
1014 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")
2022-03-02 20:31:33 +01:00
--load hump camera
Camera = require("libs/hump/camera")
camera = Camera(player.x, player.y)
2022-03-02 18:36:52 +01:00
--load content_loader
local content_loader = require("modules/content_loader")
spritesheets = content_loader.spritesheets
sound_effects = content_loader.sound_effects
--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
2022-03-02 20:31:33 +01:00
drawerinit(spritesheets, player, game, camera)
updateinit(game, camera)
2022-03-02 18:36:52 +01:00
player:init(sound_effects, spritesheets, game)
2022-03-02 20:31:33 +01:00
--play music for level
game:getcurlevel().music:play()
2022-03-02 18:36:52 +01:00
function love.draw()
draw_callback()
end
function love.update(dt)
update_callback(dt)
end