![]() |
Gondwana Game Engine Development (master) - 2.6.1
Gondwana is a cross-platform 2.5D game and rendering engine written in C#/.NET 8. It provides fine-grained control over rendering, timing, and scene composition, with built-in support for parallax, z-ordering, pixel overhang, collision detection, and particle effects. Gondwana targets desktop and web platforms using SkiaSharp for graphics and pluggable audio backends for desktop and browser targets.
|
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...
Protected Member Functions | |
| InputEventConfigurationBase (double secondsBetweenEvents, bool isPaused) | |
| 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. | |
Properties | |
| 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.
Definition at line 11 of file InputEventConfigurationBase.cs.
|
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.
| 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. |
Definition at line 38 of file InputEventConfigurationBase.cs.
|
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.
Definition at line 73 of file InputEventConfigurationBase.cs.
|
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.
Definition at line 56 of file InputEventConfigurationBase.cs.