So I know this is a really simple question, but I can’t figure out how to do it!
So I have this code:
void draw()
{
if (startGame)
// do stuff
if (lose)
DisplayTimer();
}
void mousePressed()
{
startGame = true;
}
So as soon as the person pressed the mouse, it starts the timer. And when the person loses the game, the timer stops. Now I considered using millis()
however I can’t figure out how it make it start when the game starts.
Can anyone help me? Thanks