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
end
function ChoregraphySystem:addQTE(action, origin, qteBaseData, blockProcess)
function ChoregraphySystem:addQTE(action, origin, qteBaseData, blockProcess, tag)
local qteData = core.datas:parse("qtesteps", qteBaseData)
if (qteObjectList[qteData.name] ~= nil) then
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)
self.qte.current:setTag(tag)
end
end

View file

@ -8,7 +8,7 @@ end
function StepGFX:start()
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
self:finish()

View file

@ -6,7 +6,7 @@ function StepQTE:new(controller, args)
end
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
self:finish()
end

View file

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

View file

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

View file

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