fix:only load lovebird when launched in debug
This commit is contained in:
parent
1355b252df
commit
388c6f1ef9
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue