diff --git a/sonic-radiance.love/datas/parsers/choregraphystep.lua b/sonic-radiance.love/datas/parsers/choregraphystep.lua index 26afa89..da2a424 100644 --- a/sonic-radiance.love/datas/parsers/choregraphystep.lua +++ b/sonic-radiance.love/datas/parsers/choregraphystep.lua @@ -6,8 +6,9 @@ return { ["playSFX"] = {"sfx"}, ["sendDamage"] = {"power", "type", "element", "isSpecial"}, ["goTo"] = {"origin", "x", "y", "duration", "blockProcess"}, + ["goTo3D"] = {"origin", "x", "y", "z", "duration", "blockProcess"}, ["setAnimation"] = {"animation", "blockProcess"}, - ["jump"] = {"power", "bounceNumber", "blockProcess"}, + ["jump"] = {"power", "useDefaultAnimation", "blockProcess"}, ["jumpTo"] = {"origin", "x", "y", "duration", "blockProcess"}, ["jumpBack"] = {"height", "speed", "blockProcess"}, ["waitActorFinished"] = {"waitFor"}, diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/goTo3D.lua b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/goTo3D.lua new file mode 100644 index 0000000..4846695 --- /dev/null +++ b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/goTo3D.lua @@ -0,0 +1,29 @@ +local StepParent = require "scenes.battlesystem.controllers.fighters.systems.choregraphy.step.parent" +local GoTo3DStep = StepParent:extend() + +function GoTo3DStep:new(controller, args) + GoTo3DStep.super.new(self, controller, args, true) +end + +function GoTo3DStep:start() + + local x, y, z = self:getStepCoordinate() + self.choregraphy.actor:goTo3D(x, y, z, self.arguments.duration) + + self.choregraphy.actor:addTaggedAction(self.tag, self.choregraphy, "goTo") + if (self.arguments.blockProcess == false) then + self:finish() + else + self.choregraphy.actor:blockChoregraphy(self.arguments.blockProcess, self, "goTo") + end +end + +function GoTo3DStep:update(dt) + +end + +function GoTo3DStep:getSignal(signal) + +end + +return GoTo3DStep; diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/init.lua b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/init.lua index 6773208..4b2080a 100644 --- a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/init.lua +++ b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/init.lua @@ -5,7 +5,9 @@ local baseURI = "scenes.battlesystem.controllers.fighters.systems.choregraphy.st actions["addGFX"] = require(baseURI .. "addGFX") actions["addQTE"] = require(baseURI .. "addQTE") actions["goTo"] = require(baseURI .. "goTo") +actions["goTo3D"] = require(baseURI .. "goTo3D") actions["jumpBack"] = require(baseURI .. "jumpBack") +actions["jump"] = require(baseURI .. "jump") actions["playSFX"] = require(baseURI .. "playSFX") actions["sendDamage"] = require(baseURI .. "sendDamage") actions["setAnimation"] = require(baseURI .. "setAnimation") diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/jump.lua b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/jump.lua new file mode 100644 index 0000000..8b9621c --- /dev/null +++ b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/jump.lua @@ -0,0 +1,27 @@ +local StepParent = require "scenes.battlesystem.controllers.fighters.systems.choregraphy.step.parent" +local JumpStep = StepParent:extend() + +function JumpStep:new(controller, args) + JumpStep.super.new(self, controller, args, true) +end + +function JumpStep:start() + self.choregraphy.actor:setJump(self.arguments.power, 0, self.arguments.useDefaultAnimation) + + self.choregraphy.actor:addTaggedAction(self.tag, self.choregraphy, "jump") + if (self.arguments.blockProcess == false) then + self:finish() + else + self.choregraphy.actor:blockChoregraphy(self.arguments.blockProcess, self, "jump") + end +end + +function JumpStep:update(dt) + +end + +function JumpStep:getSignal(signal) + +end + +return JumpStep; diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/parent.lua b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/parent.lua index dd4131d..f07de15 100644 --- a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/parent.lua +++ b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/parent.lua @@ -25,18 +25,18 @@ function StepParent:updateStep(dt) end function StepParent:getStepCoordinate() - local argx, argy = self.arguments.x, self.arguments.y + local argx, argy, argz = self.arguments.x, self.arguments.y, self.arguments.z or 0 argx = argx * self.choregraphy.actor.start.direction if (self.arguments.origin == "target") then local target = self.choregraphy.action.target - local x, y = target.actor:getCoordinate() - return x + argx, y + argy + local x, y, z = target.actor:getCoordinate() + return x + argx, y + argy, z + argz elseif (self.arguments.origin == "start") then - local x, y = self.choregraphy.actor.start.x, self.choregraphy.actor.start.y - return x + argx, y + argy + local x, y, z = self.choregraphy.actor.start.x, self.choregraphy.actor.start.y, self.choregraphy.actor.start.z + return x + argx, y + argy, z + argz elseif (self.arguments.origin == "actor") then - local x, y = self.choregraphy.actor:getCoordinate() - return x + argx, y + argy + local x, y, z = self.choregraphy.actor:getCoordinate() + return x + argx, y + argy, z + argz end end