Interface IInputDevice
- Namespace
- Gloam.Core.Interfaces
- Assembly
- Gloam.Core.dll
Interface for input devices that can be implemented by Console, MonoGame, etc.
public interface IInputDevice
Properties
Mouse
Gets the current mouse state including position and button states
MouseState Mouse { get; }
Property Value
Methods
EndFrame()
Called at the end of each frame to update edge detection
void EndFrame()
IsDown(InputKeyData)
Check if a key is currently held down
bool IsDown(InputKeyData key)
Parameters
key
InputKeyDataThe key to check
Returns
- bool
True if the key is currently pressed
Poll()
Polls the input device for current state
void Poll()
WasPressed(InputKeyData)
Check if a key was pressed this frame (edge detection)
bool WasPressed(InputKeyData key)
Parameters
key
InputKeyDataThe key to check
Returns
- bool
True if the key was just pressed
WasReleased(InputKeyData)
Check if a key was released this frame (edge detection)
bool WasReleased(InputKeyData key)
Parameters
key
InputKeyDataThe key to check
Returns
- bool
True if the key was just released