chore: make movable less tied to battler

This commit is contained in:
Kazhnuz 2021-08-07 11:14:08 +02:00
parent a418ecfb21
commit bccc71ec58
2 changed files with 3 additions and 6 deletions

View file

@ -82,8 +82,6 @@ function Battler:update(dt)
self.world:switchActiveBattler() self.world:switchActiveBattler()
end end
end end
self:updateMovement(dt)
end end
function Battler:purgeFrameSignal() function Battler:purgeFrameSignal()
@ -132,9 +130,7 @@ end
function Battler:timerResponse(signal) function Battler:timerResponse(signal)
self:finishAction(signal) self:finishAction(signal)
if (signal == "resetMovement") then if (signal == "removeOutput") then
self:resetMovementType()
elseif (signal == "removeOutput") then
self.showOutput = false self.showOutput = false
end end
end end

View file

@ -41,7 +41,8 @@ function Movable:stopMoving()
self:finishAction("goTo") self:finishAction("goTo")
end end
function Movable:updateMovement(dt) function Movable:update(dt)
Movable.super.update(self, dt)
self:updateMotion(dt) self:updateMotion(dt)
self:updateDirection() self:updateDirection()
self:updatePreviousPosition() self:updatePreviousPosition()