Adding basic pyra movement
This commit is contained in:
10
pyras.p8
10
pyras.p8
@ -9,6 +9,7 @@ function _init()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function _update()
|
function _update()
|
||||||
|
movepyras()
|
||||||
moveguy()
|
moveguy()
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -48,6 +49,15 @@ function drawpyras()
|
|||||||
pset(pyra[1],pyra[2],8)
|
pset(pyra[1],pyra[2],8)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function movepyras()
|
||||||
|
for pyra in all(pyras) do
|
||||||
|
if (pyra[1]>guyposx) pyra[1]-=1
|
||||||
|
if (pyra[1]<guyposx) pyra[1]+=1
|
||||||
|
if (pyra[2]>guyposy) pyra[2]-=1
|
||||||
|
if (pyra[2]<guyposy) pyra[2]+=1
|
||||||
|
end
|
||||||
|
end
|
||||||
__gfx__
|
__gfx__
|
||||||
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
Reference in New Issue
Block a user