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
|
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
|
if (btnp(🅾️)) then
|
||||||
player.vy = -6
|
player.vy = -5
|
||||||
player.jumping = true
|
player.jumping = true
|
||||||
end
|
end
|
||||||
player.y += player.vy
|
player.y += player.vy
|
||||||
|
Loading…
Reference in New Issue
Block a user