Expose Getter and Setter for Engine Running Variable

This commit is contained in:
Marty Oehme 2018-07-09 17:00:53 +02:00
parent e472766bcc
commit 7c49531d0e

View file

@ -20,7 +20,7 @@ class Engine {
final html.CanvasElement canvas; final html.CanvasElement canvas;
Grid grid = new Grid(100, 100); Grid grid = new Grid(100, 100);
bool running = false; bool _running = false;
Engine(this.canvas) { Engine(this.canvas) {
_elapsed.start(); _elapsed.start();
@ -66,4 +66,7 @@ class Engine {
// print("rendering"); // print("rendering");
grid.render(canvas, interp); grid.render(canvas, interp);
} }
void set running(bool on) => _running = on;
bool get running => _running;
} }