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