2020-07-24 19:16:33 +02:00
|
|
|
local ChoregraphySystem = Object:extend()
|
|
|
|
|
2021-08-15 16:34:36 +02:00
|
|
|
local QteMixin = require "scenes.battlesystem.choregraphy.mixins.qtes"
|
|
|
|
local StepsMixin = require "scenes.battlesystem.choregraphy.mixins.steps"
|
|
|
|
local TagsMixin = require "scenes.battlesystem.choregraphy.mixins.tags"
|
|
|
|
local CountersMixin = require "scenes.battlesystem.choregraphy.mixins.counters"
|
|
|
|
local WrappersMixin = require "scenes.battlesystem.choregraphy.mixins.wrappers"
|
|
|
|
local SubChoregraphiesMixin = require "scenes.battlesystem.choregraphy.mixins.subchoregraphies"
|
2021-08-08 13:11:36 +02:00
|
|
|
|
|
|
|
local TweenManager = require "birb.classes.time"
|
2021-08-08 09:49:43 +02:00
|
|
|
|
|
|
|
ChoregraphySystem:implement(QteMixin)
|
|
|
|
ChoregraphySystem:implement(StepsMixin)
|
|
|
|
ChoregraphySystem:implement(TagsMixin)
|
|
|
|
ChoregraphySystem:implement(CountersMixin)
|
|
|
|
ChoregraphySystem:implement(WrappersMixin)
|
2021-08-08 13:11:36 +02:00
|
|
|
ChoregraphySystem:implement(SubChoregraphiesMixin)
|
2021-07-17 21:19:33 +02:00
|
|
|
|
2021-08-08 13:11:36 +02:00
|
|
|
function ChoregraphySystem:new(action, choregraphy, subChoregraphy)
|
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()
|
2021-08-08 13:11:36 +02:00
|
|
|
self:initSubchoregraphies(subChoregraphy)
|
|
|
|
|
|
|
|
self.tweens = TweenManager(self)
|
2020-07-31 20:06:35 +02:00
|
|
|
|
2021-08-08 09:49:43 +02:00
|
|
|
self.actor:resetFrameSignal()
|
2020-07-24 19:16:33 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
function ChoregraphySystem:update(dt)
|
2021-08-08 09:49:43 +02:00
|
|
|
self:updateSteps(dt)
|
2021-08-08 13:11:36 +02:00
|
|
|
self.tweens:update(dt)
|
|
|
|
self:updateSubChoregraphies(dt)
|
|
|
|
end
|
|
|
|
|
|
|
|
function ChoregraphySystem:timerResponse(signal)
|
|
|
|
if (signal == "startNextTarget") then
|
|
|
|
self:startNextTarget()
|
|
|
|
end
|
2020-07-24 19:16:33 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
function ChoregraphySystem:endChoregraphy()
|
2020-07-25 10:25:00 +02:00
|
|
|
self.actor:choregraphyEnded()
|
2020-07-24 19:16:33 +02:00
|
|
|
self.action:choregraphyEnded()
|
2020-07-25 08:44:59 +02:00
|
|
|
self.fighter.turnSystem:applyDeath()
|
2020-07-24 19:16:33 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
return ChoregraphySystem
|