Implement Engine Step Method
This commit is contained in:
parent
9030d31e97
commit
ac9a7c7591
2 changed files with 5 additions and 2 deletions
|
@ -39,8 +39,7 @@ class AppComponent implements OnInit {
|
|||
}
|
||||
|
||||
void onStepClicked() {
|
||||
engine.running = false;
|
||||
engine.update();
|
||||
engine.step();
|
||||
}
|
||||
|
||||
void onResetClicked() {
|
||||
|
|
|
@ -60,6 +60,10 @@ class Engine {
|
|||
void update() {
|
||||
// print("updating");
|
||||
if(!grid.update()) running = false;
|
||||
|
||||
void step() {
|
||||
running = false;
|
||||
_grid.update();
|
||||
}
|
||||
|
||||
void render([num interp]) {
|
||||
|
|
Loading…
Reference in a new issue