Logo Mibo

InputMapper Module

Service accessors for the registered IInputMapper.

Functions and values

Function or value Description

getService ctx

Full Usage: getService ctx

Parameters:
Returns: IInputMapper<'Action>
Type parameters: 'Action (requires comparison)

Gets the registered IInputMapper service.

ctx : GameContext
Returns: IInputMapper<'Action>
System.Exception Thrown when no IInputMapper is registered (use Program.withInputMapper).

tryGetService ctx

Full Usage: tryGetService ctx

Parameters:
Returns: IInputMapper<'Action> voption
Type parameters: 'Action (requires comparison)

Attempts to get the registered IInputMapper service.

ctx : GameContext
Returns: IInputMapper<'Action> voption

Type something to start searching.