sonic-bluestreak/sonic-bluestreak.love/scenes/battlesystem/choregraphy/subchoregraphy.lua

45 lines
1.1 KiB
Lua
Raw Permalink Normal View History

2021-11-25 10:57:13 +01:00
local SubChoregraphy = Object:extend()
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"
SubChoregraphy:implement(QteMixin)
SubChoregraphy:implement(StepsMixin)
SubChoregraphy:implement(TagsMixin)
SubChoregraphy:implement(CountersMixin)
SubChoregraphy:implement(WrappersMixin)
function SubChoregraphy:new(parent, target, choregraphy)
self.parent = parent
self:initWrappers(parent.action, target)
self:initSteps(choregraphy)
self:initQte()
self:initTagActions()
self:initCounters()
self:register()
end
function SubChoregraphy:register()
self.parent:registerSubChoregraphy(self)
end
function SubChoregraphy:update(dt)
self:updateQte(dt)
self:updateSteps(dt)
end
function SubChoregraphy:endChoregraphy()
self.parent:removeSubChoregraphy(self)
end
function SubChoregraphy:draw()
self:drawQte()
end
return SubChoregraphy