2019-02-03 20:00:08 +01:00
|
|
|
local Scene = require "core.modules.scenes"
|
|
|
|
local BoostLevel = Scene:extend()
|
2019-02-03 20:10:35 +01:00
|
|
|
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-03 19:54:02 +01:00
|
|
|
self.controller = Controller()
|
|
|
|
print("battle started")
|
|
|
|
--self.background = love.graphics.newImage("assets/background/testbackground.png")
|
|
|
|
end
|
|
|
|
|
2019-02-03 19:58:13 +01:00
|
|
|
function BoostLevel:update(dt)
|
2019-02-03 19:54:02 +01:00
|
|
|
game:update(dt)
|
|
|
|
game.input:update(dt)
|
|
|
|
self.controller:update(dt)
|
|
|
|
end
|
|
|
|
|
2019-02-03 19:58:13 +01:00
|
|
|
function BoostLevel:draw()
|
2019-02-03 19:54:02 +01:00
|
|
|
--CScreen:apply()
|
|
|
|
love.graphics.setColor(1, 1, 1, 1)
|
|
|
|
love.graphics.rectangle("fill", 0, 0, 424, 240)
|
|
|
|
--love.graphics.draw(self.background, 0, 0)
|
|
|
|
self.controller:draw()
|
|
|
|
--CScreen:cease()
|
|
|
|
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
|