fix: make landing work

This commit is contained in:
Kazhnuz 2021-08-07 11:39:34 +02:00
parent 28a869a42e
commit 44cda944f5
2 changed files with 14 additions and 3 deletions

View file

@ -80,6 +80,13 @@ function Battler:update(dt)
end end
end end
-- Movement
-- Some specific movement function
function Battler:land()
self:changeAnimation("idle")
end
-- CHOREGRAPHY FUNCTIONS -- CHOREGRAPHY FUNCTIONS
-- All functions related to the choregraphy system -- All functions related to the choregraphy system

View file

@ -210,12 +210,16 @@ function Movable:resetJump()
end end
function Movable:stopJumping() function Movable:stopJumping()
self:resetJump() self.tweens:newTimer(0.01, "jump")
self:finishAction("jump")
if (self.jump.stopWhenLanding) then if (self.jump.stopWhenLanding) then
self:resetMotion() self:resetMotion()
end end
self:changeAnimation("idle") self:resetJump()
self:land()
end
function Movable:land()
-- Empty function
end end
function Movable:setJump(power, bounceNumber, useDefaultAnimation) function Movable:setJump(power, bounceNumber, useDefaultAnimation)