InputManager

Manages input devices and provides event handling for keyboard and mouse input.

Properties

OnKeyPressed

(Action) { get; set } = null!: Event that is raised when a key is pressed.

Input

(IInputContext) : Gets the input context associated with this input manager.

Public Methods

Initalize

public void Initalize()

Initializes the InputManager by connecting to input devices.

Connect

public void Connect(IInputDevice device, bool isConnected)

Connects to an input device based on its connection status.

Parameters:

  • device (IInputDevice): The input device to connect or disconnect.
  • isConnected (bool): True if the device is connected; otherwise, false.

Dispose

public void Dispose()

Disposes of the input manager and releases associated resources.