sonic-radiance/sonic-radiance.love/scenes/battlesystem/controllers/player.lua
2021-03-13 18:00:39 +01:00

30 lines
716 B
Lua

local FighterControllerParent = require "scenes.battlesystem.controllers.parent"
local HeroFighterController = FighterControllerParent:extend()
local Character = require "scenes.battlesystem.controllers.fighters.character"
function HeroFighterController:new(owner)
self.super.new(self, owner)
self:initHeroes()
end
function HeroFighterController:initHeroes()
for i, hero in ipairs(game.characters.team) do
self:add(Character(self, hero, i))
end
end
function HeroFighterController:fleeBattle()
for i, hero in ipairs(self.list) do
hero.actor:flee()
end
end
function HeroFighterController:draw()
for i, hero in ipairs(self.list) do
hero:drawHUD()
end
end
return HeroFighterController