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
|
||||||
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
|
||||||
|
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue