fix: adapt to the new QTE functions

This commit is contained in:
Kazhnuz 2021-04-25 12:19:46 +02:00
parent e3acafc824
commit 4f26969a4d

View file

@ -23,7 +23,7 @@ end
function ChoregraphySystem:update(dt)
if (self.qte.current ~= nil) then
self.qte.current:update(dt)
self.qte.current:updateQte(dt)
end
if (self.currentStep ~= nil) then
@ -49,12 +49,18 @@ end
function ChoregraphySystem:addQTE(action, origin, qteBaseData, blockProcess)
local qteData = choregraphyUtils.getQteDatas(qteBaseData)
if (qteObjectList[qteData.name] ~= nil) then
self.qte.current = qteObjectList[qteData.name](self, qteData.arguments)
core.debug:print("cbs/choregraphy", "Starting qte " .. qteData.name)
self.qte.current = qteObjectList[qteData.name](self, qteData.arguments, 0, 0)
self.qte.current:blockAction(action, blockProcess)
self.qte.current:setOrigin(origin)
end
end
function ChoregraphySystem:endQte(success)
self.qte.current = nil
self.qte.wasSuccess = success
end
function ChoregraphySystem:sendDamage(power, accuracy, isSpecial, isAerial)
if (self.target ~= nil) then
if (self.fighter.isAlive) then
@ -84,4 +90,10 @@ function ChoregraphySystem:haveNextStep()
return ((self.currentStepId + 1) <= #self.stepList)
end
function ChoregraphySystem:draw()
if (self.qte.current ~= nil) then
self.qte.current:draw()
end
end
return ChoregraphySystem