Class Hosting
- Namespace
- Axolotl2D
- Assembly
- Axolotl2D.dll
Presents methods for injecting game-related services into a Host.
public static class Hosting
- Inheritance
-
Hosting
- Inherited Members
Methods
AddScene<T>(IServiceCollection)
Registers a game scene.
public static void AddScene<T>(this IServiceCollection services) where T : BaseScene
Parameters
services
IServiceCollectionService provider
Type Parameters
T
Scene to register.
Exceptions
- InvalidOperationException
Tried to register an abstract class or the BaseScene class itself.
UseAssetManager(IServiceCollection)
Registers the Asset Manager.
public static void UseAssetManager(this IServiceCollection services)
Parameters
services
IServiceCollectionService Collection
UseAudioPlayer(IServiceCollection)
Registers the Audio Player.
public static void UseAudioPlayer(this IServiceCollection services)
Parameters
services
IServiceCollectionService provider
UseSceneManagerGameHost<T>(IServiceCollection)
Registers a game host that hosts the game using scenes.
public static void UseSceneManagerGameHost<T>(this IServiceCollection services) where T : Game
Parameters
services
IServiceCollectionService Collection
Type Parameters
T
Game to host
Exceptions
- InvalidOperationException
Can not register multiple IGameHost services.
UseSimpleGameHost<T>(IServiceCollection)
Registers a game host that simply hosts the game.
public static void UseSimpleGameHost<T>(this IServiceCollection services) where T : Game
Parameters
services
IServiceCollectionService Collection
Type Parameters
T
Game to host
Exceptions
- InvalidOperationException
Can not register multiple IGameHost services.