Table of Contents

Class AxolotlModuleRegistry

Namespace
Axolotl2D.Packages
Assembly
Axolotl2D.dll

Stores runtime extensions contributed by explicitly loaded executable packages. Registrations use stable IDs so the game does not need compile-time access to package types.

public sealed class AxolotlModuleRegistry
Inheritance
AxolotlModuleRegistry
Inherited Members

Properties

GameObjects

Gets a snapshot of registered package GameObject factories.

public IReadOnlyCollection<AxolotlGameObjectRegistration> GameObjects { get; }

Property Value

IReadOnlyCollection<AxolotlGameObjectRegistration>

Scenes

Gets a snapshot of registered package scenes.

public IReadOnlyCollection<AxolotlSceneRegistration> Scenes { get; }

Property Value

IReadOnlyCollection<AxolotlSceneRegistration>

Methods

GetExtension<TContract>(string)

Gets a game-defined extension by contract and stable ID.

public TContract GetExtension<TContract>(string id) where TContract : class

Parameters

id string

Returns

TContract

Type Parameters

TContract

GetExtensions<TContract>()

Gets all extensions registered for a game-defined contract.

public IReadOnlyDictionary<string, TContract> GetExtensions<TContract>() where TContract : class

Returns

IReadOnlyDictionary<string, TContract>

Type Parameters

TContract

GetGameObject(string)

Gets a package GameObject factory by its stable ID.

public AxolotlGameObjectRegistration GetGameObject(string id)

Parameters

id string

Returns

AxolotlGameObjectRegistration

GetScene(string)

Gets a package scene by its stable ID.

public AxolotlSceneRegistration GetScene(string id)

Parameters

id string

Returns

AxolotlSceneRegistration