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.
Loading...
Searching...
No Matches
AvaloniaBitmapGameHost.cs
3
5
9public abstract class AvaloniaBitmapGameHost : GameHostBase
10{
15
22 {
23 RenderSurface = renderSurface ?? throw new ArgumentNullException(nameof(renderSurface));
24 }
25
29 protected sealed override void ConfigurePlatform()
30 {
32 }
33
37 protected sealed override void ConfigureKeyboard()
38 {
39 Engine.InitializeAvaloniaKeyboardAdapter(RenderSurface);
41 }
42
46 protected sealed override void ConfigureMouse()
47 {
48 Engine.InitializeAvaloniaMouseAdapter(RenderSurface);
50 }
51
55 protected sealed override void ConfigureGamepads()
56 {
58 }
59
63 protected sealed override void ConfigureTouch()
64 {
65 Engine.InitializeAvaloniaTouchAdapter(RenderSurface);
67 }
68
73 protected sealed override void BindScene()
74 {
75 var scene = Scene
76 ?? throw new InvalidOperationException(
77 $"{nameof(BindScene)} cannot be called before {nameof(Scene)} has been created.");
78
79 RenderSurface.Host.Bind(scene, false);
80 }
81
85 protected virtual void OnConfigurePlatform()
86 {
87 }
88
92 protected virtual void OnKeyboardAdapterInitialized()
93 {
94 }
95
99 protected virtual void OnMouseAdapterInitialized()
100 {
101 }
102
106 protected virtual void OnConfigureGamepads()
107 {
108 }
109
113 protected virtual void OnTouchAdapterInitialized()
114 {
115 }
116
120 protected sealed override void OnInputConfigured()
121 {
122 base.OnInputConfigured();
123
125 }
126}
override void ConfigureGamepads()
Configures gamepad support.
virtual void OnTouchAdapterInitialized()
Called after the touch adapter has been initialized.
override void OnInputConfigured()
Called after input is configured during engine startup to initialize widget input for the render surf...
override void ConfigureMouse()
Configures the mouse adapter for the Avalonia render surface.
override void BindScene()
Binds the current scene to the Avalonia render surface host.
override void ConfigurePlatform()
Configures Avalonia-specific platform features.
virtual void OnConfigureGamepads()
Provides a hook for configuring gamepad support.
AvaloniaBitmapRenderSurfaceControl RenderSurface
Gets the render surface control used for displaying game content.
AvaloniaBitmapGameHost(AvaloniaBitmapRenderSurfaceControl renderSurface)
Initializes a new instance of the AvaloniaBitmapGameHost class.
virtual void OnMouseAdapterInitialized()
Called after the mouse adapter has been initialized.
override void ConfigureTouch()
Configures the touch adapter for the Avalonia render surface.
virtual void OnConfigurePlatform()
Provides a hook for configuring additional Avalonia-specific platform settings during initialization.
override void ConfigureKeyboard()
Configures the keyboard adapter for the Avalonia render surface.
virtual void OnKeyboardAdapterInitialized()
Called after the keyboard adapter has been initialized.
An Avalonia Control that displays game frames produced by the Gondwana engine. Frames are received as...
Provides a base class for hosting and managing the lifecycle of a Gondwana game application.
Scene? Scene
Gets the current active scene.
void InitializeWidgetInput(RenderSurfaceHostBase renderSurfaceHost)
Initializes widget input routing for the supplied render surface host.
Engine Engine
Gets the singleton instance of the Gondwana engine.