require "require" -- lib, include, class local config = require "conf" if not debug then debug = {} end debug.log = print -- if config.ENABLE_KEYBOARD then lovr.keyboard = lib "lovr-keyboard" end local pollr = lib "pollr" local phong = lib "phong" local stager = lib "stager" local global = require "global" local Cellulo = require "cellulo" local config = require "conf" local shader = phong() shader:send("lightPosition", { 0, 10, 10 }) function lovr.load() global:load() stager:push("scenes/game") -- initialize library if config.ENABLE_CELLULO then Cellulo.lib.initialize() else global.robot = (class "MockCellulo"):new() global.playerBoid:setCellulo(global.robot) end if not global.robot then -- redirect to menu if robot is missing stager:push("scenes/menu") end end local time = 0 function lovr.update(dt) time = time + dt while time > 1 do time = time - 1 lovr.slowUpdate(1) end pollr.update() stager:update(dt) global:update(dt) end function lovr.slowUpdate(...) stager:slowUpdate(...) end function lovr.draw() stager:draw() global:draw() end function pollr.buttonpressed(...) stager:buttonpressed(...) end function lovr.controlleradded(...) stager:controlleradded(...) end function lovr.controllerremoved(...) stager:controllerremoved(...) end