instead of calling goTo for citizen each frame, do one citizen per frame

This commit is contained in:
2019-01-30 13:30:22 +01:00
parent 14941c1b2e
commit e89d776eed

3
UI.pde
View File

@@ -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;
}