GameApplication Class
Definition
Namespace: Brine2D.Hosting
The main game application host.
Inheritance System.Object → GameApplication
Implements System.IAsyncDisposable
| Properties | |
|---|---|
| Services | Gets the service provider. |
| Methods | |
|---|---|
| CreateBuilder\(string\[\]\) | Creates a game application builder with pre-configured defaults. |
| DisposeAsync() | Disposes the game application and releases all resources. |
| RunAsync<TScene>\(Func<IServiceProvider,TScene>, CancellationToken\) | Starts the game application with a custom scene factory. Use this when you need to pass runtime data to the initial scene that DI alone cannot provide. Pass null for sceneFactory to use standard DI resolution. |
| RunAsync<TScene>\(CancellationToken\) | Starts the game application with the specified initial scene. Runs the game on a dedicated thread and returns a task that completes when the game exits. |