2019-02-03 20:00:08 +01:00
|
|
|
local Scene = require "core.modules.scenes"
|
2019-02-04 08:40:41 +01:00
|
|
|
local BoostLevel = Scene:extend()
|
|
|
|
local Controller = require "scenes.subgame.sonic-boost.controller"
|
2019-02-03 19:54:02 +01:00
|
|
|
|
2019-02-03 20:00:08 +01:00
|
|
|
function BoostLevel:new()
|
2019-02-04 08:40:06 +01:00
|
|
|
BoostLevel.super.new(self)
|
2019-02-03 19:54:02 +01:00
|
|
|
self.controller = Controller()
|
2019-02-04 08:43:48 +01:00
|
|
|
|
|
|
|
self:register()
|
2019-02-03 19:54:02 +01:00
|
|
|
end
|
|
|
|
|
2019-02-03 19:58:13 +01:00
|
|
|
function BoostLevel:update(dt)
|
2019-02-03 19:54:02 +01:00
|
|
|
self.controller:update(dt)
|
|
|
|
end
|
|
|
|
|
2019-02-03 19:58:13 +01:00
|
|
|
function BoostLevel:draw()
|
2019-02-03 19:54:02 +01:00
|
|
|
self.controller:draw()
|
|
|
|
end
|
|
|
|
|
2019-02-03 19:58:13 +01:00
|
|
|
function BoostLevel:leave()
|
2019-02-03 19:54:02 +01:00
|
|
|
self.controller:destroy()
|
|
|
|
self.controller = nil
|
|
|
|
|
|
|
|
collectgarbage()
|
|
|
|
end
|
|
|
|
|
2019-02-03 19:58:13 +01:00
|
|
|
return BoostLevel
|