sonic-radiance/sonic-radiance.love/scenes/battlesystem/fighters/player.lua

24 lines
594 B
Lua
Raw Normal View History

local FighterControllerParent = require "scenes.battlesystem.fighters.parent"
local HeroFighterController = FighterControllerParent:extend()
2020-07-18 09:51:02 +02:00
local Character = require "scenes.battlesystem.fighters.character"
2020-07-18 09:51:02 +02:00
function HeroFighterController:new(owner)
self.super.new(self, owner)
self:initHeroes()
2020-07-18 09:51:02 +02:00
end
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
2021-03-13 18:00:39 +01:00
function HeroFighterController:fleeBattle()
for i, hero in ipairs(self.list) do
hero.actor:flee()
end
end
return HeroFighterController