Provides a base class for input event configuration that implements throttling and pause functionality for various input types (keyboard, mouse, gamepad). This abstract class manages timing between events using high-resolution ticks and tracks the last event occurrence to enable event rate limiting. Derived classes extend this functionality for specific input device types.
More...
|
| double | TimeBetweenEvents [get, set] |
| | Gets or sets the minimum time interval in seconds that must elapse between consecutive events. This property controls the throttling rate for input events, preventing excessive event generation from high-frequency input sources. The value is stored internally as high-resolution ticks for precise timing calculations.
|
| bool | IsPaused = false [get, set] |
| | Gets or sets a value indicating whether event processing is currently paused. When set to true, events will not be raised even if input occurs and timing conditions are met. This property provides a convenient way to temporarily disable input event generation without removing or reconfiguring the event monitoring setup, useful for modal dialogs, cutscenes, or transitioning between game states.
|
Provides a base class for input event configuration that implements throttling and pause functionality for various input types (keyboard, mouse, gamepad). This abstract class manages timing between events using high-resolution ticks and tracks the last event occurrence to enable event rate limiting. Derived classes extend this functionality for specific input device types.
◆ InputEventConfigurationBase()
| Gondwana.Input.InputEventConfigurationBase.InputEventConfigurationBase |
( |
double | secondsBetweenEvents, |
|
|
bool | isPaused ) |
|
protected |
Initializes a new instance of the InputEventConfigurationBase class with the specified throttling interval and pause state. This constructor sets up the timing mechanism for event rate limiting.
- Parameters
-
| secondsBetweenEvents | The minimum time interval in seconds that must elapse between consecutive events. This value is converted to high-resolution ticks internally for precise timing. A value of 0 means no throttling is applied, allowing events to fire as frequently as input occurs. |
| isPaused | A value indicating whether event processing is initially paused. When paused, events will not be raised even if input occurs and timing conditions are met. This provides a way to temporarily disable input without removing the configuration. |
◆ IsPaused
| bool Gondwana.Input.InputEventConfigurationBase.IsPaused = false |
|
getset |
Gets or sets a value indicating whether event processing is currently paused. When set to true, events will not be raised even if input occurs and timing conditions are met. This property provides a convenient way to temporarily disable input event generation without removing or reconfiguring the event monitoring setup, useful for modal dialogs, cutscenes, or transitioning between game states.
true if event processing is paused and events should not be raised; otherwise, false. Default is false.
◆ TimeBetweenEvents
| double Gondwana.Input.InputEventConfigurationBase.TimeBetweenEvents |
|
getset |
Gets or sets the minimum time interval in seconds that must elapse between consecutive events. This property controls the throttling rate for input events, preventing excessive event generation from high-frequency input sources. The value is stored internally as high-resolution ticks for precise timing calculations.
The time interval in seconds. A value of 0 means no throttling is applied, and events can be raised as frequently as input changes occur. Higher values reduce event frequency, which can be useful for rate-limiting button repeat events or reducing processing overhead from rapid input.