2020-07-19 15:07:35 +02:00
|
|
|
local FighterControllerParent = require "scenes.battlesystem.controllers.parent"
|
|
|
|
local HeroFighterController = FighterControllerParent:extend()
|
2020-07-18 09:51:02 +02:00
|
|
|
|
2020-07-19 15:07:35 +02:00
|
|
|
local Character = require "scenes.battlesystem.controllers.fighters.character"
|
2020-07-18 09:51:02 +02:00
|
|
|
|
2020-07-19 15:07:35 +02:00
|
|
|
function HeroFighterController:new(owner)
|
|
|
|
self.super.new(self, owner)
|
|
|
|
self:initHeroes()
|
2020-07-18 09:51:02 +02:00
|
|
|
end
|
|
|
|
|
2020-07-19 15:07:35 +02:00
|
|
|
function HeroFighterController:initHeroes()
|
|
|
|
for i, hero in ipairs(game.characters.team) do
|
|
|
|
self:add(Character(self, hero, i))
|
|
|
|
end
|
2020-07-18 09:51:02 +02:00
|
|
|
end
|
|
|
|
|
2020-07-19 16:20:57 +02:00
|
|
|
function HeroFighterController:draw()
|
|
|
|
for i, hero in ipairs(self.list) do
|
|
|
|
hero:drawHUD()
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-07-19 15:07:35 +02:00
|
|
|
return HeroFighterController
|