diff --git a/sonic-radiance.love/core/modules/scenes.lua b/sonic-radiance.love/core/modules/scenes.lua index f658769..848ab4d 100644 --- a/sonic-radiance.love/core/modules/scenes.lua +++ b/sonic-radiance.love/core/modules/scenes.lua @@ -43,6 +43,8 @@ function Scene:new() self.inputLocked = true self.inputLockedTimer = 2 + self.dialog = nil + self:initWorld() self:register() @@ -76,11 +78,17 @@ function Scene:updateEnd(dt) end function Scene:updateWorld(dt) - if ((self.world ~= nil) and (self.world.isActive)) then + if ((self.world ~= nil) and (self.world.isActive) and (self.dialog == nil)) then self.world:update(dt) end end +function Scene:updateDialog(dt) + if (self.dialog ~= nil) then + self.dialog:update(dt) + end +end + -- MOUSE FUNCTIONS -- Make the scene support the pointer @@ -139,6 +147,12 @@ function Scene:drawWorld(dt) end end +function Scene:drawDialog(dt) + if (self.dialog ~= nil) then + self.dialog:draw() + end +end + -- INPUT FUNCTIONS -- Handle inputs from keyboard/controllers