instead of calling goTo for citizen each frame, do one citizen per frame
This commit is contained in:
3
UI.pde
3
UI.pde
@@ -109,7 +109,8 @@ void buttonFunctions(int s) {
|
||||
for (int i = 0; i < citizen.length; i++) {
|
||||
if (!citizen[i].b_moving) {
|
||||
if (citizen[i].nextNode == 0) {
|
||||
citizen[i].goTo(int(random(0, pg_map.width)), int(random(0, pg_map.height)), 10);
|
||||
b_makeThemGo = true;
|
||||
//citizen[i].goTo(int(random(0, pg_map.width)), int(random(0, pg_map.height)), 10);
|
||||
} else {
|
||||
citizen[i].b_moving = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user