feat: add qteSuccess and qteFailure conditions
This commit is contained in:
parent
6a37f12776
commit
72cccdcaf2
1 changed files with 9 additions and 0 deletions
|
@ -20,6 +20,7 @@ function ChoregraphySystem:new(action, choregraphy)
|
|||
self.qte = {}
|
||||
self.qte.current = nil
|
||||
self.qte.wasSuccess = false
|
||||
self.qte.list = {}
|
||||
end
|
||||
|
||||
function ChoregraphySystem:update(dt)
|
||||
|
@ -50,9 +51,15 @@ end
|
|||
function ChoregraphySystem:checkCondition(condition)
|
||||
local conditionArgs = utils.string.split(condition, ":")
|
||||
local success = true
|
||||
|
||||
if (conditionArgs[1] == "sentDamage" and (not self.haveSentDamage)) then
|
||||
success = false
|
||||
elseif (conditionArgs[1] == "qteSuccess" and (not self.qte.list[tonumber(conditionArgs[2])])) then
|
||||
success = false
|
||||
elseif (conditionArgs[1] == "qteFailure" and (self.qte.list[tonumber(conditionArgs[2])])) then
|
||||
success = false
|
||||
end
|
||||
|
||||
return success
|
||||
end
|
||||
|
||||
|
@ -69,6 +76,8 @@ end
|
|||
function ChoregraphySystem:endQte(success)
|
||||
self.qte.current = nil
|
||||
self.qte.wasSuccess = success
|
||||
|
||||
table.insert(self.qte.list, success)
|
||||
end
|
||||
|
||||
function ChoregraphySystem:sendDamage(power, type, element, isSpecial)
|
||||
|
|
Loading…
Reference in a new issue