You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// replace this with the "mario jump", player has a bigger jump the longer they hold down the jump button
39
-
40
-
// -- jump -- from https://github.com/Joshalexjacobs/Fantastic-Guac-Endless-Demo/blob/master/player.lua
41
-
// if (love.keyboard.isDown('n') and player.isJumping == false and player.isGrounded and player.jumpLock == false) or (pressX() and player.isJumping == false and player.isGrounded and player.jumpLock == false) then -- when the player hits jump
42
-
// player.isJumping = true
43
-
// player.jumpLock = true
44
-
// player.isGrounded = false
45
-
// player.dy = -player.initVel -- 6 is our current initial velocity
46
-
// jumpTimer = jumpTimerMax // this is like a "jump hold" timer
47
-
// elseif (love.keyboard.isDown('n') and jumpTimer > 0 and player.isJumping) or (pressX() and jumpTimer > 0 and player.isJumping) then
48
-
// player.dy = player.dy + (-0.5) // I think this is a double jump
49
-
// elseif (love.keyboard.isDown('n') == false and player.isJumping) or (pressX() == false and player.isJumping) then -- if the player releases the jump button mid-jump...
50
-
// if player.dy < player.termVel then -- and if the player's velocity has reached the minimum velocity (minimum jump height)...
51
-
// player.dy = player.termVel -- terminate the jump
0 commit comments