Skip to content

InputAPI reference

Interface IActionSource

Namespace: MicroEngine.Input
Assembly: MicroEngine.Input.dll
Guide: Input

A source of actions rather than of keys: on-screen touch controls, a network peer, an accessibility switch or an AI. Added with AddSource, it is read every step together with the keyboard and gamepad, so a game cannot tell which produced an action.

C#
public interface IActionSource

Properties

Actions

Actions this source may press that need no key binding (read even if the map does not bind them).

C#
IEnumerable<string> Actions { get; }

Property Value

IEnumerable<string>

Device

The kind of device this source stands for, reported by LastDevice.

C#
InputDevice Device { get; }

Property Value

InputDevice

Methods

IsDown(string)

Whether the action is down (digital).

C#
bool IsDown(string action)

Parameters

action string

Returns

bool

Value(string)

The action’s strength, 0..1 (analog). Digital sources keep the default.

C#
float Value(string action)

Parameters

action string

Returns

float