InputAPI reference
Class PlayerInput
Namespace: MicroEngine.Input
Assembly: MicroEngine.Input.dll
Guide: Input
One local player: an action map of their own (Map) read from the devices paired with them.
public sealed class PlayerInputInheritance
Properties
Devices
The devices paired with this player, in id order. Empty for player 1 until something is paired with them.
public IReadOnlyList<DeviceId> Devices { get; }Property Value
Index
The player’s position, 0-based: player 1 is 0.
public int Index { get; }Property Value
Map
The player’s actions, sampled once per update from their devices.
public InputMap Map { get; }Property Value
Owns
Whether this player hears a device (see OwnerOf).
public Func<DeviceId, bool> Owns { get; }Property Value
Methods
Pair(DeviceId)
Pairs device with this player, taking it from whoever had it.
public PlayerInput Pair(DeviceId device)Parameters
device DeviceId
Returns
Unpair(DeviceId)
Ends the pairing of device with this player; false when it was not paired with them.
public bool Unpair(DeviceId device)Parameters
device DeviceId