Expose Getter and Setter for Engine Running Variable
This commit is contained in:
parent
e472766bcc
commit
7c49531d0e
1 changed files with 4 additions and 1 deletions
|
@ -20,7 +20,7 @@ class Engine {
|
|||
|
||||
final html.CanvasElement canvas;
|
||||
Grid grid = new Grid(100, 100);
|
||||
bool running = false;
|
||||
bool _running = false;
|
||||
|
||||
Engine(this.canvas) {
|
||||
_elapsed.start();
|
||||
|
@ -66,4 +66,7 @@ class Engine {
|
|||
// print("rendering");
|
||||
grid.render(canvas, interp);
|
||||
}
|
||||
|
||||
void set running(bool on) => _running = on;
|
||||
bool get running => _running;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue