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
gameGameGame to host
_servicesIServiceProviderServices
Methods
ChangeScene<T>()
Switches to a different scene.
public void ChangeScene<T>() where T : BaseScene
Type Parameters
TType of the Scene to switch to
StartAsync(CancellationToken)
Starts the game.
public Task StartAsync(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationToken
Returns
StopAsync(CancellationToken)
Stops the game.
public Task StopAsync(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationToken