Hello @moffmix,
This will restart from setup()
:
void keyPressed()
{
if (key == 'r' || key == 'R')
{
music.stop();
purr.stop();
frameCount = -1; //next frame is setup() which is frameCount = 0
}
}
References:
- https://discourse.processing.org/t/about-restarting/22557/3
- https://processing.org/tutorials/interactivity
- https://processing.org/reference/keyPressed_.html
:)