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 DebugSystem = Object:extend()
|
||||||
|
|
||||||
local lovebird = require "birb.libs.lovebird"
|
local lovebird
|
||||||
|
|
||||||
local Levels = enum {
|
local Levels = enum {
|
||||||
"ERROR",
|
"ERROR",
|
||||||
|
@ -38,12 +38,13 @@ function DebugSystem:new(controller)
|
||||||
self.debugLevel = self.controller.conf.debugLevel or Levels.INFO
|
self.debugLevel = self.controller.conf.debugLevel or Levels.INFO
|
||||||
self.active = (self.debugLevel == Levels.DEBUG)
|
self.active = (self.debugLevel == Levels.DEBUG)
|
||||||
if (self.active) then
|
if (self.active) then
|
||||||
|
lovebird = require "birb.libs.lovebird"
|
||||||
lovebird.update()
|
lovebird.update()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function DebugSystem:update(dt)
|
function DebugSystem:update(dt)
|
||||||
if (self.active) then
|
if (self.active and lovebird ~= nil) then
|
||||||
lovebird.update(dt)
|
lovebird.update(dt)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue