Skip to content

Commit

Permalink
Added support for custom abort_jump speed reduction
Browse files Browse the repository at this point in the history
  • Loading branch information
Björn Ritzl committed Feb 7, 2017
1 parent f369e26 commit edf2146
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ludobits/m/platformer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ function M.create(collision_hashes)
end
end

function instance.abort_jump()
function instance.abort_jump(reduction)
if jumping_up() then
instance.velocity.y = instance.velocity.y * 0.5
instance.velocity.y = instance.velocity.y * (reduction or 0.5)
end
end

Expand Down

0 comments on commit edf2146

Please sign in to comment.