45 lines
1.3 KiB
Lua
45 lines
1.3 KiB
Lua
pico-8 cartridge // http://www.pico-8.com
|
||
version 37
|
||
__lua__
|
||
-- maths attacks --
|
||
-- by djib --
|
||
btn_stat = false
|
||
btnp_stat = false
|
||
held_stat = false
|
||
switch = false
|
||
|
||
function _init()
|
||
end
|
||
|
||
function _update()
|
||
btn_stat = false
|
||
if btn(➡️) then
|
||
btn_stat = true
|
||
end
|
||
btnp_stat = false
|
||
if btnp(➡️) then
|
||
btnp_stat = true
|
||
end
|
||
if btnp(➡️) and btn(➡️) then
|
||
if switch then
|
||
held_stat = true
|
||
else
|
||
switch=true
|
||
end
|
||
else
|
||
held_stat = false
|
||
end
|
||
|
||
end
|
||
|
||
function _draw()
|
||
print(tostr(btn_stat) .. "-" .. tostr(btnp_stat) .. "-" tostr(held_stat))
|
||
end
|
||
__gfx__
|
||
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||
00700700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||
00077000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||
00077000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||
00700700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|