feat: add an action to change anim speed inbattle

This commit is contained in:
Kazhnuz 2021-07-19 12:09:21 +02:00
parent 07fc1efc8a
commit a61b2e1453
3 changed files with 23 additions and 0 deletions

View file

@ -12,6 +12,7 @@ return {
["jumpTo"] = {"origin", "x", "y", "duration", "blockProcess"},
["jumpBack"] = {"height", "speed", "blockProcess"},
["waitActorFinished"] = {"waitFor"},
["setAnimSpeed"] = {"speed"},
["waitFor"] = {"waitFor"},
["skipTo"] = {"skipTo"},
["addQTE"] = {"qteData", "origin", "blockProcess"},

View file

@ -12,6 +12,7 @@ actions["jump"] = require(baseURI .. "jump")
actions["playSFX"] = require(baseURI .. "playSFX")
actions["sendDamage"] = require(baseURI .. "sendDamage")
actions["setAnimation"] = require(baseURI .. "setAnimation")
actions["setAnimSpeed"] = require(baseURI .. "setAnimSpeed")
actions["wait"] = require(baseURI .. "wait")
actions["waitFor"] = require(baseURI .. "waitFor")
actions["skipTo"] = require(baseURI .. "skipTo")

View file

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