Cleaning code

This commit is contained in:
2021-11-11 21:48:26 +01:00
parent 17abbd3492
commit f68e790400

View File

@ -1,28 +1,30 @@
pico-8 cartridge // http://www.pico-8.com
version 33
__lua__
function _update()
moveguy()
end
function _draw()
cls()
drawguy()
end
-->8
-- guy
guyposx=64
guyposy=64
guyspeedx=2
guyspeedy=2
function _update()
if btn(0) then
guyposx-=guyspeedx
end
if btn(1) then
guyposx+=guyspeedx
end
if btn(2) then
guyposy-=guyspeedy
end
if btn(3) then
guyposy+=guyspeedy
end
function moveguy()
if (btn(0)) guyposx-=guyspeedx
if (btn(1)) guyposx+=guyspeedx
if (btn(2)) guyposy-=guyspeedy
if (btn(3)) guyposy+=guyspeedy
end
function _draw()
cls()
function drawguy()
rect(guyposx,guyposy,guyposx,guyposy,3)
end
__gfx__