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
|
||||
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__
|
||||
|
Reference in New Issue
Block a user