if (frameCount%60 == 0) means:
- only when the modulo (remainder) of a division by 60 is 0, a new random number is produced.
So in frame 60, then 120, and so on.
So, approx. once per second only
if (frameCount%60 == 0) means:
So in frame 60, then 120, and so on.
So, approx. once per second only