Logo Mibo

GameContext Module

Functions for accessing and managing services in the GameContext.

Functions and values

Function or value Description

getService ctx

Full Usage: getService ctx

Parameters:
Returns: 'T
Type parameters: 'T

Gets a registered service by type.

ctx : GameContext
Returns: 'T
System.InvalidOperationException Thrown when the service is not registered.

tryGetService ctx

Full Usage: tryGetService ctx

Parameters:
Returns: 'T voption ValueSome if the service is registered, ValueNone otherwise.
Type parameters: 'T

Attempts to get a registered service by type.

ctx : GameContext
Returns: 'T voption

ValueSome if the service is registered, ValueNone otherwise.

Type something to start searching.