37 lines
837 B
Lua
37 lines
837 B
Lua
|
local ChoregraphyActionParent = require "scenes.battlesystem.actors.systems.actions.parent"
|
||
|
local GFXAction = ChoregraphyActionParent:extend()
|
||
|
|
||
|
function GFXAction:new(controller, args, effectArea)
|
||
|
GFXAction.super.new(self, controller, args, effectArea)
|
||
|
end
|
||
|
|
||
|
function GFXAction:start()
|
||
|
local dx = self.args.dx
|
||
|
|
||
|
if (self.args.affectedByDirection) then
|
||
|
dx = dx * self.actor.direction
|
||
|
end
|
||
|
|
||
|
local x = self.actor.x
|
||
|
local y = self.actor.y
|
||
|
local z = 0
|
||
|
|
||
|
self.actor.world.obj.GFX(self.actor.world, x + dx, y + self.args.dy, z, self.args.sprite, self, self.args.blockProcess)
|
||
|
if (not self.args.blockProcess) then
|
||
|
self:finish()
|
||
|
end
|
||
|
end
|
||
|
|
||
|
function GFXAction:update(dt)
|
||
|
|
||
|
end
|
||
|
|
||
|
function GFXAction:getSignal(signal)
|
||
|
if (signal == "gfxEnded") then
|
||
|
self:finish()
|
||
|
end
|
||
|
end
|
||
|
|
||
|
|
||
|
return GFXAction
|