I have a question about timers in Processing. I want to make a square spawn after every second that passes. Would I use a for loop, an if statement, etc.?
Asked
Active
Viewed 150 times
1 Answers
0
You could just use the millis()
function or the frameCount
variable in an if
statement.
Something like this:
void draw(){
if(frameCount % 60 == 0){
//do something
}
}
More info can be found in the reference.

Kevin Workman
- 41,537
- 9
- 68
- 107