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()
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

View file

@ -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()