2021-08-15 16:34:36 +02:00
|
|
|
local StepParent = require "scenes.battlesystem.choregraphy.step.parent"
|
2020-07-25 10:24:32 +02:00
|
|
|
local GoToStep = StepParent:extend()
|
|
|
|
|
|
|
|
function GoToStep:new(controller, args)
|
2021-07-17 10:15:24 +02:00
|
|
|
GoToStep.super.new(self, controller, args, true)
|
2020-07-25 10:24:32 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
function GoToStep:start()
|
|
|
|
local x, y = self:getStepCoordinate()
|
2021-08-07 13:36:13 +02:00
|
|
|
local actor = self:getActor(self.arguments.who)
|
|
|
|
|
|
|
|
actor:goTo(x, y, self.arguments.duration)
|
2020-07-25 10:24:32 +02:00
|
|
|
|
2021-08-07 13:36:13 +02:00
|
|
|
actor:addTaggedAction(self.tag, self.choregraphy, "goTo")
|
2020-07-25 10:24:32 +02:00
|
|
|
if (self.arguments.blockProcess == false) then
|
|
|
|
self:finish()
|
|
|
|
else
|
2021-08-07 13:36:13 +02:00
|
|
|
actor:blockChoregraphy(self.arguments.blockProcess, self, "goTo")
|
2020-07-25 10:24:32 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
function GoToStep:update(dt)
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
function GoToStep:getSignal(signal)
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
return GoToStep;
|