sonic-radiance/sonic-radiance.love/scenes/battlesystem/fighters/player.lua
Kazhnuz 2932a7d85a improvement: port the cbs menus and gui
Make them handled by a single screen, removing a lot of dispersed
drawing code in the turns handler
2021-09-16 22:26:59 +02:00

24 lines
594 B
Lua

local FighterControllerParent = require "scenes.battlesystem.fighters.parent"
local HeroFighterController = FighterControllerParent:extend()
local Character = require "scenes.battlesystem.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
return HeroFighterController