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
-- Movement
-- Some specific movement function
function Battler:land()
self:changeAnimation("idle")
end
-- CHOREGRAPHY FUNCTIONS
-- All functions related to the choregraphy system

View file

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