jueves, 30 de octubre de 2014

Tarea 1

color c = color(255);
float x = 0;
float y = 300;
float speed = 4;
void setup() {
size(600,600);
}
void draw(){
background(0);
move();
display();
}
void move() {
x = x + speed;
if (x > width) {
x = 0;
}
}
void display() {
fill(c);
rect(x,y,30,10);
}

No hay comentarios.:

Publicar un comentario