Allow pausing the software on click

This commit is contained in:
Fándly Gergő 2022-05-07 16:57:05 +03:00
parent 06f13c4745
commit c451982e21

View File

@ -1,6 +1,7 @@
PVector goal;
Obstacles obstacles;
Genetic AI;
boolean pause = false;
void setup(){
size(800, 800);
@ -18,6 +19,10 @@ void setup(){
}
void draw(){
if(pause) {
return;
}
background(255);
//draw goal
@ -46,5 +51,5 @@ void draw(){
}
void mouseClicked(){
AI.toggleDisplay();
pause = !pause;
}