Skip to content

Instantly share code, notes, and snippets.

@animanoir
Created March 28, 2022 00:10
Show Gist options
  • Save animanoir/fb4c3193b8bea92d57f9461ef96c0bcf to your computer and use it in GitHub Desktop.
Save animanoir/fb4c3193b8bea92d57f9461ef96c0bcf to your computer and use it in GitHub Desktop.
Contador de segundos para que pase algo cada x segundo en Processing.
int elapsed = millis() - lastTime;
if (elapsed >= 5000){
image(goodCandy[rand], randX, goodY, randCandyW, randCandyH);
goodY = goodY + (candySpeed * yDirCandy);
lastTime = millis();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment