Initializing pyras
This commit is contained in:
23
pyras.p8
23
pyras.p8
@ -1,6 +1,12 @@
|
|||||||
pico-8 cartridge // http://www.pico-8.com
|
pico-8 cartridge // http://www.pico-8.com
|
||||||
version 33
|
version 33
|
||||||
__lua__
|
__lua__
|
||||||
|
-- pyras
|
||||||
|
-- by: djib
|
||||||
|
|
||||||
|
function _init()
|
||||||
|
initpyras()
|
||||||
|
end
|
||||||
|
|
||||||
function _update()
|
function _update()
|
||||||
moveguy()
|
moveguy()
|
||||||
@ -9,6 +15,7 @@ end
|
|||||||
function _draw()
|
function _draw()
|
||||||
cls()
|
cls()
|
||||||
drawguy()
|
drawguy()
|
||||||
|
drawpyras()
|
||||||
end
|
end
|
||||||
-->8
|
-->8
|
||||||
-- guy
|
-- guy
|
||||||
@ -25,7 +32,21 @@ function moveguy()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function drawguy()
|
function drawguy()
|
||||||
rect(guyposx,guyposy,guyposx,guyposy,3)
|
rect(guyposx,guyposy,guyposx,guyposy,11)
|
||||||
|
end
|
||||||
|
-->8
|
||||||
|
pyras={}
|
||||||
|
|
||||||
|
function initpyras()
|
||||||
|
for i=1,10 do
|
||||||
|
pyras[i]={rnd(128),rnd(128)}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function drawpyras()
|
||||||
|
for pyra in all(pyras) do
|
||||||
|
pset(pyra[1],pyra[2],8)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
__gfx__
|
__gfx__
|
||||||
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
Reference in New Issue
Block a user