Table of Contents

Class SceneGameHost

Namespace
Axolotl2D.Scenes
Assembly
Axolotl2D.dll

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 Game

Game to host

_services IServiceProvider

Services

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

Task

StopAsync(CancellationToken)

Stops the game.

public Task StopAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Returns

Task