45 lines
880 B
Lua
45 lines
880 B
Lua
local Scene = require "core.modules.scenes"
|
|
|
|
local BattleSystem = Scene:extend()
|
|
|
|
local World = require "scenes.battlesystem.world"
|
|
local MenuSystem = require "scenes.battlesystem.menu"
|
|
|
|
local gui = require "game.modules.gui"
|
|
|
|
|
|
function BattleSystem:new()
|
|
BattleSystem.super.new(self)
|
|
|
|
self.assets:batchImport("scenes.battlesystem.assets")
|
|
self.frame = gui.newBorder(424, 30, 8)
|
|
|
|
self:initManagers()
|
|
|
|
self:register()
|
|
end
|
|
|
|
function BattleSystem:initManagers()
|
|
self.datas = {}
|
|
self.world = World(self)
|
|
self.menu = MenuSystem(self)
|
|
end
|
|
|
|
function BattleSystem:update(dt)
|
|
self.world:update(dt)
|
|
end
|
|
|
|
function BattleSystem:draw()
|
|
self.world:draw()
|
|
|
|
love.graphics.draw(self.frame, 424, 20, 0, -1, -1)
|
|
end
|
|
|
|
function BattleSystem:exit()
|
|
self.world:destroy()
|
|
self.battlearena = nil
|
|
|
|
collectgarbage()
|
|
end
|
|
|
|
return BattleSystem
|