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
|
||||
version 33
|
||||
__lua__
|
||||
-- pyras
|
||||
-- by: djib
|
||||
|
||||
function _init()
|
||||
initpyras()
|
||||
end
|
||||
|
||||
function _update()
|
||||
moveguy()
|
||||
@ -9,6 +15,7 @@ end
|
||||
function _draw()
|
||||
cls()
|
||||
drawguy()
|
||||
drawpyras()
|
||||
end
|
||||
-->8
|
||||
-- guy
|
||||
@ -25,7 +32,21 @@ function moveguy()
|
||||
end
|
||||
|
||||
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
|
||||
__gfx__
|
||||
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
|
Reference in New Issue
Block a user