fix: make landing work
This commit is contained in:
parent
28a869a42e
commit
44cda944f5
2 changed files with 14 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue