sonic-radiance/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/init.lua

42 lines
1.3 KiB
Lua
Raw Normal View History

local ChoregraphySystem = Object:extend()
2021-08-08 09:49:43 +02:00
local QteMixin = require "scenes.battlesystem.controllers.fighters.systems.choregraphy.mixins.qtes"
local StepsMixin = require "scenes.battlesystem.controllers.fighters.systems.choregraphy.mixins.steps"
local TagsMixin = require "scenes.battlesystem.controllers.fighters.systems.choregraphy.mixins.tags"
local CountersMixin = require "scenes.battlesystem.controllers.fighters.systems.choregraphy.mixins.counters"
local WrappersMixin = require "scenes.battlesystem.controllers.fighters.systems.choregraphy.mixins.wrappers"
ChoregraphySystem:implement(QteMixin)
ChoregraphySystem:implement(StepsMixin)
ChoregraphySystem:implement(TagsMixin)
ChoregraphySystem:implement(CountersMixin)
ChoregraphySystem:implement(WrappersMixin)
function ChoregraphySystem:new(action, choregraphy)
2021-08-08 09:49:43 +02:00
self:initWrappers(action)
2021-05-09 15:08:36 +02:00
2021-08-08 09:49:43 +02:00
self:initSteps(choregraphy)
self:initQte()
self:initTagActions()
self:initCounters()
2020-07-31 20:06:35 +02:00
2021-08-08 09:49:43 +02:00
self.actor:resetFrameSignal()
end
function ChoregraphySystem:update(dt)
2021-08-08 09:49:43 +02:00
self:updateQte(dt)
self:updateSteps(dt)
end
function ChoregraphySystem:endChoregraphy()
2020-07-25 10:25:00 +02:00
self.actor:choregraphyEnded()
self.action:choregraphyEnded()
self.fighter.turnSystem:applyDeath()
end
2021-04-25 12:19:46 +02:00
function ChoregraphySystem:draw()
2021-08-08 09:49:43 +02:00
self:drawQte()
2021-04-25 12:19:46 +02:00
end
return ChoregraphySystem