restart method

void restart()

Implementation

void restart() {
  astronaut.position = Offset(80, groundY);
  astronaut.velocityY = 0;
  obstacles.clear();
  score = 0;
  isGameOver = false;
  _timeSinceLastObstacle = 0;
  notifyListeners();
}