Allow pausing the software on click
This commit is contained in:
parent
06f13c4745
commit
c451982e21
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user