![]() |
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 passive touch state adapter for Blazor applications, implementing ITouchAdapter by translating Blazor ontouchstart, ontouchmove, ontouchend, and ontouchcancel events into Gondwana touch state.
More...
Public Member Functions | |
| BlazorTouchAdapter (BlazorBitmapRenderSurfaceComponent component) | |
| Initializes a new instance of BlazorTouchAdapter and attaches it to the touch events on the specified render surface component. | |
| BlazorTouchAdapter (BlazorRenderSurfaceComponentBase component) | |
| Initializes a new instance of BlazorTouchAdapter for any Gondwana Blazor render surface. | |
| IReadOnlyList< GondwanaTouchPoint > | ConsumeBeganTouches () |
Drains and returns all touch contacts that began since the last call. Keeping beginnings in a queue prevents a short tap that begins and ends between two engine polls from being lost. Adapters that do not maintain a beginning queue may rely on the default empty implementation; the poller will still discover active contacts from ActiveTouches.
| |
| IReadOnlyList< GondwanaTouchPoint > | ConsumeEndedTouches () |
Drains and returns all touch contacts that ended (lifted or cancelled) since the last call. Each entry preserves the original TouchPhase (TouchPhase.Ended or TouchPhase.Cancelled) so the poller can distinguish between the two. This method is intended to be called once per engine tick by the TouchEventPoller.
| |
| void | Dispose () |
| Releases all resources and removes event handlers registered by this adapter. | |
Properties | |
| IReadOnlyList< GondwanaTouchPoint > | ActiveTouches [get] |
| Gets the list of touch contact points that are currently active (in contact with the surface). This list reflects the state at the most recent platform pointer event. An empty list indicates no fingers are currently in contact. | |
Provides a passive touch state adapter for Blazor applications, implementing ITouchAdapter by translating Blazor ontouchstart, ontouchmove, ontouchend, and ontouchcancel events into Gondwana touch state.
Events are not raised directly; the TouchEventPoller polls this adapter each engine frame to detect transitions and raise events.
On touch-capable devices each finger contact is tracked by its browser touch identifier. On desktop platforms where touch events are not available, use the mouse adapter for pointer input.
Definition at line 28 of file BlazorTouchAdapter.cs.
| Gondwana.Blazor.Input.Touch.BlazorTouchAdapter.BlazorTouchAdapter | ( | BlazorBitmapRenderSurfaceComponent | component | ) |
Initializes a new instance of BlazorTouchAdapter and attaches it to the touch events on the specified render surface component.
| component | The render surface component to capture touch input from. |
| ArgumentNullException | Thrown when component is null. |
Definition at line 46 of file BlazorTouchAdapter.cs.
| Gondwana.Blazor.Input.Touch.BlazorTouchAdapter.BlazorTouchAdapter | ( | BlazorRenderSurfaceComponentBase | component | ) |
Initializes a new instance of BlazorTouchAdapter for any Gondwana Blazor render surface.
| component | The render surface component to capture touch input from. |
| ArgumentNullException | Thrown when component is null. |
Definition at line 57 of file BlazorTouchAdapter.cs.
| IReadOnlyList< GondwanaTouchPoint > Gondwana.Blazor.Input.Touch.BlazorTouchAdapter.ConsumeBeganTouches | ( | ) |
Drains and returns all touch contacts that began since the last call. Keeping beginnings in a queue prevents a short tap that begins and ends between two engine polls from being lost. Adapters that do not maintain a beginning queue may rely on the default empty implementation; the poller will still discover active contacts from ActiveTouches.
Implements Gondwana.Input.Touch.ITouchAdapter.
Definition at line 120 of file BlazorTouchAdapter.cs.
| IReadOnlyList< GondwanaTouchPoint > Gondwana.Blazor.Input.Touch.BlazorTouchAdapter.ConsumeEndedTouches | ( | ) |
Drains and returns all touch contacts that ended (lifted or cancelled) since the last call. Each entry preserves the original TouchPhase (TouchPhase.Ended or TouchPhase.Cancelled) so the poller can distinguish between the two. This method is intended to be called once per engine tick by the TouchEventPoller.
Implements Gondwana.Input.Touch.ITouchAdapter.
Definition at line 132 of file BlazorTouchAdapter.cs.
| void Gondwana.Blazor.Input.Touch.BlazorTouchAdapter.Dispose | ( | ) |
Releases all resources and removes event handlers registered by this adapter.
Definition at line 152 of file BlazorTouchAdapter.cs.
|
get |
Gets the list of touch contact points that are currently active (in contact with the surface). This list reflects the state at the most recent platform pointer event. An empty list indicates no fingers are currently in contact.
Implements Gondwana.Input.Touch.ITouchAdapter.
Definition at line 38 of file BlazorTouchAdapter.cs.