RaylibGameBase<R extends RaylibBase> class abstract

Platform-agnostic game lifecycle interface for Raylib applications.

Implement this to define your game logic independently of the backend. Each backend provides its own RaylibGameBase subclass and runRaylib function that drives the lifecycle in a platform-appropriate way.

The expected call order is:

  1. init = set up your game state and call RaylibCoreModuleBase.InitWindow
  2. loop = called every frame
  3. close = called when shouldClose returns true; call RaylibCoreModuleBase.CloseWindow here
  4. dispose = release Dart-side resources

Constructors

RaylibGameBase()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close(R rl) → void
Called once after shouldClose returns true.
dispose(R rl) → void
Called after close to release any remaining Dart-side resources.
init(R rl) → void
Called once before the game loop starts.
loop(R rl) → void
Called once per frame while shouldClose returns false.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shouldClose(R rl) bool
Returns true when the game loop should stop.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited