Hi,
In the code below, i would like to see, a white square,changing in red square after 500ms, changing in green square after 500 ms, changing in white square... and so on.
Instead of that only a green square ?
I don't understand what is wrong in my code ?
Could somebody help me, please, thanx.
Oliver.
In the code below, i would like to see, a white square,changing in red square after 500ms, changing in green square after 500 ms, changing in white square... and so on.
Instead of that only a green square ?
I don't understand what is wrong in my code ?
Could somebody help me, please, thanx.
Oliver.
- void setup(){
size(200,200);
rectMode(CENTER);
}
void draw(){
fill(color(255,255,255));
rect(width/2,width/2, width/4,width/4);
delay(500);
fill(color(255,0,0));
rect(width/2,width/2, width/4,width/4);
delay(500);
fill(color(0,255,0));
rect(width/2,width/2, width/4,width/4);
delay(500);
}
1