isPaused property

bool get isPaused
inherited

Whether the engine is currently paused or running.

Implementation

bool get isPaused => _isPaused;
set isPaused (bool value)
inherited

Pauses or resumes the engine.

Implementation

set isPaused(bool value) {
  _isPaused = value;

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