From bccc71ec582b4c8a674c4bac666a0126f447a374 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sat, 7 Aug 2021 11:14:08 +0200 Subject: [PATCH] chore: make movable less tied to battler --- sonic-radiance.love/scenes/battlesystem/actors/battler.lua | 6 +----- sonic-radiance.love/scenes/battlesystem/actors/movable.lua | 3 ++- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/sonic-radiance.love/scenes/battlesystem/actors/battler.lua b/sonic-radiance.love/scenes/battlesystem/actors/battler.lua index 46433af..f6d570e 100644 --- a/sonic-radiance.love/scenes/battlesystem/actors/battler.lua +++ b/sonic-radiance.love/scenes/battlesystem/actors/battler.lua @@ -82,8 +82,6 @@ function Battler:update(dt) self.world:switchActiveBattler() end end - - self:updateMovement(dt) end function Battler:purgeFrameSignal() @@ -132,9 +130,7 @@ end function Battler:timerResponse(signal) self:finishAction(signal) - if (signal == "resetMovement") then - self:resetMovementType() - elseif (signal == "removeOutput") then + if (signal == "removeOutput") then self.showOutput = false end end diff --git a/sonic-radiance.love/scenes/battlesystem/actors/movable.lua b/sonic-radiance.love/scenes/battlesystem/actors/movable.lua index 4175f52..0b6671e 100644 --- a/sonic-radiance.love/scenes/battlesystem/actors/movable.lua +++ b/sonic-radiance.love/scenes/battlesystem/actors/movable.lua @@ -41,7 +41,8 @@ function Movable:stopMoving() self:finishAction("goTo") end -function Movable:updateMovement(dt) +function Movable:update(dt) + Movable.super.update(self, dt) self:updateMotion(dt) self:updateDirection() self:updatePreviousPosition()