feat: add a way to wait for the end of something already started

This commit is contained in:
Kazhnuz 2020-07-25 17:03:37 +02:00
parent e72fa0cc7f
commit f3d44e06d1
3 changed files with 22 additions and 0 deletions

View file

@ -8,6 +8,7 @@ return {
["jump"] = {"power", "bounceNumber", "blockProcess"},
["jumpTo"] = {"origin", "x", "y", "duration", "blockProcess"},
["jumpBack"] = {"duration", "blockProcess"},
["waitActorFinished"] = {"waitFor"},
--[name] = {args},
}

View file

@ -9,5 +9,6 @@ actions["playSFX"] = require(baseURI .. "playSFX")
actions["sendDamage"] = require(baseURI .. "sendDamage")
actions["setAnimation"] = require(baseURI .. "setAnimation")
actions["wait"] = require(baseURI .. "wait")
actions["waitActorFinished"] = require(baseURI .. "waitActorFinished")
return actions

View file

@ -0,0 +1,20 @@
local StepParent = require "scenes.battlesystem.controllers.fighters.systems.choregraphy.step.parent"
local WaitActorFinishedStep = StepParent:extend()
function WaitActorFinishedStep:new(controller, args)
WaitActorFinishedStep.super.new(self, controller, args)
end
function WaitActorFinishedStep:start()
self.choregraphy.actor:blockChoregraphy(true, self, self.arguments.waitFor)
end
function WaitActorFinishedStep:update(dt)
end
function WaitActorFinishedStep:getSignal(signal)
end
return WaitActorFinishedStep;