paused property

bool paused

Returns is the engine if currently paused or running

Implementation

bool get paused => _paused;
void paused=(bool value)

Pauses or resume the engine

Implementation

set paused(bool value) {
  _paused = value;

  final gameLoop = _gameRenderBox?.gameLoop;
  if (gameLoop != null) {
    if (value) {
      gameLoop.stop();
    } else {
      gameLoop.start();
    }
  }
}