Gondwana Game Engine
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, mobile, and web platforms using SkiaSharp for graphics and NAudio for sound.
Loading...
Searching...
No Matches
Gondwana.Input.InputEventConfigurationBase Class Referenceabstract

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...

Inheritance diagram for Gondwana.Input.InputEventConfigurationBase:
Gondwana.Input.Gamepad.GamepadButtonEventConfiguration Gondwana.Input.Keyboard.KeyEventConfiguration Gondwana.Input.Mouse.MouseEventConfiguration

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.

Detailed Description

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.

Constructor & Destructor Documentation

◆ 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
secondsBetweenEventsThe 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.
isPausedA 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.

Property Documentation

◆ 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.