Improve input keys
This commit is contained in:
@ -1,5 +1,5 @@
|
|||||||
pico-8 cartridge // http://www.pico-8.com
|
pico-8 cartridge // http://www.pico-8.com
|
||||||
version 37
|
version 39
|
||||||
__lua__
|
__lua__
|
||||||
-- maths attacks --
|
-- maths attacks --
|
||||||
-- by djib --
|
-- by djib --
|
||||||
@ -129,20 +129,20 @@ function get_input()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
elseif btn_held(❎) then
|
elseif btn_held(❎) then
|
||||||
result = "fire!"
|
|
||||||
elseif btn_pressed(🅾️) then
|
|
||||||
result = "0"
|
result = "0"
|
||||||
elseif btn_held(🅾️) then
|
elseif btn_pressed(🅾️) then
|
||||||
result = "clear!"
|
result = "clear!"
|
||||||
|
elseif btn_held(🅾️) then
|
||||||
|
result = "fire!"
|
||||||
end
|
end
|
||||||
return result
|
return result
|
||||||
end
|
end
|
||||||
|
|
||||||
function input_matches(v)
|
function input_matches(v)
|
||||||
return btn(⬆️)==v.up and
|
return btn(⬆️)==v.up and
|
||||||
btn(⬇️)==v.down and
|
btn(⬇️)==v.down and
|
||||||
btn(⬅️)==v.left and
|
btn(⬅️)==v.left and
|
||||||
btn(➡️)==v.right
|
btn(➡️)==v.right
|
||||||
end
|
end
|
||||||
|
|
||||||
function draw_keypad()
|
function draw_keypad()
|
||||||
@ -165,8 +165,6 @@ function draw_keypad()
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-->8
|
|
||||||
|
|
||||||
__gfx__
|
__gfx__
|
||||||
66666660666666606666666066666660666666606666666066666660666666606666666066666660000000000000000000000000000000000000000000000000
|
66666660666666606666666066666660666666606666666066666660666666606666666066666660000000000000000000000000000000000000000000000000
|
||||||
67111765671177656711176567111765671717656711176567111765671117656711176567111765000000000000000000000000000000000000000000000000
|
67111765671177656711176567111765671717656711176567111765671117656711176567111765000000000000000000000000000000000000000000000000
|
||||||
|
Reference in New Issue
Block a user