Cleaning code
This commit is contained in:
32
pyras.p8
32
pyras.p8
@ -1,28 +1,30 @@
|
|||||||
pico-8 cartridge // http://www.pico-8.com
|
pico-8 cartridge // http://www.pico-8.com
|
||||||
version 33
|
version 33
|
||||||
__lua__
|
__lua__
|
||||||
|
|
||||||
|
function _update()
|
||||||
|
moveguy()
|
||||||
|
end
|
||||||
|
|
||||||
|
function _draw()
|
||||||
|
cls()
|
||||||
|
drawguy()
|
||||||
|
end
|
||||||
|
-->8
|
||||||
|
-- guy
|
||||||
guyposx=64
|
guyposx=64
|
||||||
guyposy=64
|
guyposy=64
|
||||||
guyspeedx=2
|
guyspeedx=2
|
||||||
guyspeedy=2
|
guyspeedy=2
|
||||||
|
|
||||||
function _update()
|
function moveguy()
|
||||||
if btn(0) then
|
if (btn(0)) guyposx-=guyspeedx
|
||||||
guyposx-=guyspeedx
|
if (btn(1)) guyposx+=guyspeedx
|
||||||
end
|
if (btn(2)) guyposy-=guyspeedy
|
||||||
if btn(1) then
|
if (btn(3)) guyposy+=guyspeedy
|
||||||
guyposx+=guyspeedx
|
|
||||||
end
|
|
||||||
if btn(2) then
|
|
||||||
guyposy-=guyspeedy
|
|
||||||
end
|
|
||||||
if btn(3) then
|
|
||||||
guyposy+=guyspeedy
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function _draw()
|
function drawguy()
|
||||||
cls()
|
|
||||||
rect(guyposx,guyposy,guyposx,guyposy,3)
|
rect(guyposx,guyposy,guyposx,guyposy,3)
|
||||||
end
|
end
|
||||||
__gfx__
|
__gfx__
|
||||||
|
Reference in New Issue
Block a user