fb:porticula NoPaste
Triangle Example2
Uploader: | darksider3 |
Datum/Zeit: | 12.10.2011 17:35:07 |
'Erstellt einen Laserstrahl der seine Position jede
'Sekunde ändert. Die Farbe auch.
#include once "ext/graphics.bi"
#include once "fbgfx.bi"
screenres 320, 220, 32
dim i as integer
dim n as integer
dim x as integer
dim y as integer
n=0
x=0
i = 0
do while not multikey(FB.SC_ESCAPE)
screenlock
i += 1
y += 1
cls
ext.gfx.Triangle( , 32-y, 1+x, 1+i, 10+i, 10+i, 1+i, rgb(255-i,0+i,0+i) ) 'Draw a red triangle in the top left corner of the screen
print str(i)
print str(y)
print str(x)
print str(n)
screenunlock
sleep 3
IF i = 400 THEN
i = 0
n = 132-32+y/3
x = i-n-312+i*2/329
Endif
if y = 700 THEN
y=0
endif
cls
loop 'loop until the user pushes the ESC key