don't autorepeat button inputs
This commit is contained in:
parent
fd7ccea172
commit
273f307375
10
borb.p8
10
borb.p8
@ -14,8 +14,14 @@ function init_world()
|
||||
end
|
||||
|
||||
function _init()
|
||||
-- disable btnp autorepeat
|
||||
poke(0x5f5c, 255)
|
||||
|
||||
-- set peach as bg color
|
||||
-- instead of black
|
||||
palt(black, false)
|
||||
palt(peach, true)
|
||||
|
||||
init_world()
|
||||
end
|
||||
|
||||
@ -47,8 +53,8 @@ function update_player()
|
||||
player.moves += 1
|
||||
player.flipx = false
|
||||
end
|
||||
if (btnp(🅾️) and not player.jumping) then
|
||||
player.vy = -6
|
||||
if (btnp(🅾️)) then
|
||||
player.vy = -5
|
||||
player.jumping = true
|
||||
end
|
||||
player.y += player.vy
|
||||
|
Loading…
Reference in New Issue
Block a user