feat: wire up tags

This commit is contained in:
Kazhnuz 2021-07-17 21:23:29 +02:00
parent 09ac826f34
commit 4445fec8d2
6 changed files with 7 additions and 3 deletions

View file

@ -82,13 +82,14 @@ function ChoregraphySystem:checkCondition(condition)
return success return success
end end
function ChoregraphySystem:addQTE(action, origin, qteBaseData, blockProcess) function ChoregraphySystem:addQTE(action, origin, qteBaseData, blockProcess, tag)
local qteData = core.datas:parse("qtesteps", qteBaseData) local qteData = core.datas:parse("qtesteps", qteBaseData)
if (qteObjectList[qteData.name] ~= nil) then if (qteObjectList[qteData.name] ~= nil) then
core.debug:print("cbs/choregraphy", "Starting qte " .. qteData.name) core.debug:print("cbs/choregraphy", "Starting qte " .. qteData.name)
self.qte.current = qteObjectList[qteData.name](self, qteData.arguments, 0, 0) self.qte.current = qteObjectList[qteData.name](self, qteData.arguments, 0, 0)
self.qte.current:blockAction(action, blockProcess) self.qte.current:blockAction(action, blockProcess)
self.qte.current:setOrigin(origin) self.qte.current:setOrigin(origin)
self.qte.current:setTag(tag)
end end
end end

View file

@ -8,7 +8,7 @@ end
function StepGFX:start() function StepGFX:start()
local x, y = self:getStepCoordinate() local x, y = self:getStepCoordinate()
self.choregraphy.world.obj.GFX(self.choregraphy.world, x, y, 0, self.arguments.sprite, self, self.arguments.blockProcess) self.choregraphy.world.obj.GFX(self.choregraphy.world, x, y, 0, self.arguments.sprite, self, self.arguments.blockProcess, self.tag)
if (not self.arguments.blockProcess) then if (not self.arguments.blockProcess) then
self:finish() self:finish()

View file

@ -6,7 +6,7 @@ function StepQTE:new(controller, args)
end end
function StepQTE:start() function StepQTE:start()
self.choregraphy:addQTE(self, self.arguments.origin, self.arguments.qteData, self.arguments.blockProcess) self.choregraphy:addQTE(self, self.arguments.origin, self.arguments.qteData, self.arguments.blockProcess, self.tag)
if (not self.arguments.blockProcess) then if (not self.arguments.blockProcess) then
self:finish() self:finish()
end end

View file

@ -10,6 +10,7 @@ function GoToStep:start()
local x, y = self:getStepCoordinate() local x, y = self:getStepCoordinate()
self.choregraphy.actor:goTo(x, y, self.arguments.duration) self.choregraphy.actor:goTo(x, y, self.arguments.duration)
self.choregraphy.actor:addTaggedAction(self.tag, self.choregraphy, "goTo")
if (self.arguments.blockProcess == false) then if (self.arguments.blockProcess == false) then
self:finish() self:finish()
else else

View file

@ -9,6 +9,7 @@ function JumpBackStep:start()
self.choregraphy.actor:jumpBack() self.choregraphy.actor:jumpBack()
self.choregraphy.actor:addTaggedAction(self.tag, self.choregraphy, "jump")
if (self.arguments.blockProcess == false) then if (self.arguments.blockProcess == false) then
self:finish() self:finish()
else else

View file

@ -8,6 +8,7 @@ end
function AnimationSetterStep:start() function AnimationSetterStep:start()
self.choregraphy.actor:changeAnimation(self.arguments.animation) self.choregraphy.actor:changeAnimation(self.arguments.animation)
self.choregraphy.actor:addTaggedAction(self.tag, self.choregraphy, "animation")
if (self.arguments.blockProcess == false) then if (self.arguments.blockProcess == false) then
self:finish() self:finish()
else else