Pausing in a draw() loop
in
Programming Questions
•
1 year ago
I'm very new to processing, and I'm trying to create some code, but I've gotten stuck and was wondering if someone could help me. Basically, I'm trying to have a series of circles appear, then pause for 5 or 6 seconds, and then have another series of circles appear.
Looking at my code now, I realize that this isn't going to work at all the way I've set it up, but could someone please explain to me how to do this? With this code they're always going to appear together.
void draw()
{
float ar = random(0,600);
float ar2 = random(100,600);
float br = random(0,600);
float br2 = random(100,600);
if (a < 10)
{
ellipse (ar,ar2,10,10);
fill(163,16,126);
a = a+ 1;
}
else
{
}
if (b < 30)
{
ellipse (br,br2,10,10);
fill(27,120,185);
b = b + 1;
}
else
{
}
}
1