Prepare Engine for Button responses
This commit is contained in:
parent
020bb6b918
commit
5a10c0e1f7
1 changed files with 7 additions and 2 deletions
|
@ -27,6 +27,11 @@ class App {
|
|||
_elapsed.start();
|
||||
}
|
||||
|
||||
void reset () {
|
||||
grid = new Grid(100, 100);
|
||||
running = false;
|
||||
}
|
||||
|
||||
void process(num now) {
|
||||
_drawLag+= _elapsed.elapsedMilliseconds;
|
||||
_updateLag += _elapsed.elapsedMilliseconds;
|
||||
|
@ -38,7 +43,7 @@ class App {
|
|||
print("ERROR STUCK IN UPDATE LOOP");
|
||||
break;
|
||||
}
|
||||
update();
|
||||
if (running == true) update();
|
||||
_updateLag -= _MS_PER_STEP;
|
||||
}
|
||||
|
||||
|
@ -50,7 +55,7 @@ class App {
|
|||
|
||||
void update() {
|
||||
// print("updating");
|
||||
if (running == true) grid.update();
|
||||
grid.update();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue