paused property

bool get paused

Returns is the engine if currently paused or running

Implementation

bool get paused => _paused;
set 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();
    }
  }
}