runRaylib function

void runRaylib(
  1. RaylibGame game, {
  2. String? nativeLibPath,
})

nativeLibPath is ignored on the web backend.

Implementation

void runRaylib(RaylibGame game, {String? nativeLibPath}) => Raylib((rl) {
  game.init(rl);
  rl.setMainLoop(() {
    if (game.shouldClose(rl)) {
      rl.cancelMainLoop();
      game.close(rl);
      game.dispose(rl);
      return;
    } else {
      game.loop(rl);
    }
  });
});