Class SceneGameHost
Represents a service that hosts the game using Scenes.
public class SceneGameHost : IGameHost, IHostedService
- Inheritance
-
SceneGameHost
- Implements
- Inherited Members
Constructors
SceneGameHost(Game, IServiceProvider)
Represents a service that hosts the game using Scenes.
public SceneGameHost(Game game, IServiceProvider _services)
Parameters
game
GameGame to host
_services
IServiceProviderServices
Methods
ChangeScene<T>()
Switches to a different scene.
public void ChangeScene<T>() where T : BaseScene
Type Parameters
T
Type of the Scene to switch to
StartAsync(CancellationToken)
Starts the game.
public Task StartAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationToken
Returns
StopAsync(CancellationToken)
Stops the game.
public Task StopAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationToken