sonic-radiance/sonic-radiance.love/scenes/battlesystem/choregraphy/step/goTo.lua

31 lines
678 B
Lua
Raw Normal View History

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)
GoToStep.super.new(self, controller, args, true)
2020-07-25 10:24:32 +02:00
end
function GoToStep:start()
local x, y = self:getStepCoordinate()
local actor = self:getActor(self.arguments.who)
actor:goTo(x, y, self.arguments.duration)
2020-07-25 10:24:32 +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
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;