Browse Source

don't autorepeat button inputs

main
Colin McMillen 3 years ago
parent
commit
273f307375
  1. 10
      borb.p8

10
borb.p8

@ -14,8 +14,14 @@ function init_world()
end end
function _init() function _init()
-- disable btnp autorepeat
poke(0x5f5c, 255)
-- set peach as bg color
-- instead of black
palt(black, false) palt(black, false)
palt(peach, true) palt(peach, true)
init_world() init_world()
end end
@ -47,8 +53,8 @@ function update_player()
player.moves += 1 player.moves += 1
player.flipx = false player.flipx = false
end end
if (btnp(🅾️) and not player.jumping) then
player.vy = -6
if (btnp(🅾️)) then
player.vy = -5
player.jumping = true player.jumping = true
end end
player.y += player.vy player.y += player.vy

Loading…
Cancel
Save