fix:only load lovebird when launched in debug

This commit is contained in:
Kazhnuz 2021-06-06 13:28:09 +02:00
parent 1355b252df
commit 388c6f1ef9

View file

@ -23,7 +23,7 @@
local DebugSystem = Object:extend()
local lovebird = require "birb.libs.lovebird"
local lovebird
local Levels = enum {
"ERROR",
@ -38,12 +38,13 @@ function DebugSystem:new(controller)
self.debugLevel = self.controller.conf.debugLevel or Levels.INFO
self.active = (self.debugLevel == Levels.DEBUG)
if (self.active) then
lovebird = require "birb.libs.lovebird"
lovebird.update()
end
end
function DebugSystem:update(dt)
if (self.active) then
if (self.active and lovebird ~= nil) then
lovebird.update(dt)
end
end