![]() |
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.
|
Convenience owner for a group of scene-layer radial lights. More...
Public Member Functions | |
| DirectLightLayer (RenderSurfaceHostBase renderSurfaceHost, SceneLayer sceneLayer) | |
| Initializes a new light owner for the given render surface and scene layer. | |
| DirectRadialLight | AddTorchLight (PointF centerWorldPx, float radiusWorldPx, Color? color=null, string? nickname=null) |
| Creates a warm, screen-blended torch-style light. | |
| bool | Remove (DirectRadialLight light) |
| Removes and disposes a light owned by this layer. | |
| void | Clear () |
| Disposes every light owned by this layer. | |
| void | Dispose () |
Properties | |
| RenderSurfaceHostBase | RenderSurfaceHost [get] |
| Gets the render surface host used by lights created from this owner. | |
| SceneLayer | SceneLayer [get] |
| Gets the scene layer where lights are drawn. | |
| IReadOnlyList< DirectRadialLight > | Lights [get] |
| Gets the lights owned by this layer. | |
| int | DefaultZOrder = 10_000 [get, set] |
| Gets or sets the Z-order assigned to newly-created lights. | |
Events | |
| Action< DirectRadialLight >? | LightAdded |
| Occurs after a light has been added to this owner. | |
| Action< DirectRadialLight >? | LightRemoving |
| Occurs before a light is disposed and removed from this owner. | |
Convenience owner for a group of scene-layer radial lights.
This is intentionally not a new SceneLayer type. Each light is still a bounded DirectRadialLight registered with DirectDrawingManager, so the existing scene-layer drawable query can include only lights whose world bounds intersect the dirty world rect.
Use this class when a game wants a clear logical owner for torch/lamp lights without changing the renderer's composition model.
Definition at line 22 of file DirectLightLayer.cs.
| Gondwana.Drawing.Direct.DirectLightLayer.DirectLightLayer | ( | RenderSurfaceHostBase | renderSurfaceHost, |
| SceneLayer | sceneLayer ) |
Initializes a new light owner for the given render surface and scene layer.
| renderSurfaceHost | The render-surface host that owns the drawing. |
| sceneLayer | The scene layer that owns the content. |
Definition at line 41 of file DirectLightLayer.cs.
| DirectRadialLight Gondwana.Drawing.Direct.DirectLightLayer.AddTorchLight | ( | PointF | centerWorldPx, |
| float | radiusWorldPx, | ||
| Color? | color = null, | ||
| string? | nickname = null ) |
Creates a warm, screen-blended torch-style light.
| centerWorldPx | The center in world pixels. |
| radiusWorldPx | The radius in world pixels. |
| color | The color to apply. |
| nickname | An optional name used to identify the object. |
Definition at line 75 of file DirectLightLayer.cs.
| void Gondwana.Drawing.Direct.DirectLightLayer.Clear | ( | ) |
Disposes every light owned by this layer.
Definition at line 119 of file DirectLightLayer.cs.
| void Gondwana.Drawing.Direct.DirectLightLayer.Dispose | ( | ) |
Definition at line 128 of file DirectLightLayer.cs.
| bool Gondwana.Drawing.Direct.DirectLightLayer.Remove | ( | DirectRadialLight | light | ) |
Removes and disposes a light owned by this layer.
| light | The light. |
true if the entry was found and removed; otherwise, false.Definition at line 106 of file DirectLightLayer.cs.
|
getset |
Gets or sets the Z-order assigned to newly-created lights.
Definition at line 65 of file DirectLightLayer.cs.
|
get |
Gets the lights owned by this layer.
Definition at line 60 of file DirectLightLayer.cs.
|
get |
Gets the render surface host used by lights created from this owner.
Definition at line 50 of file DirectLightLayer.cs.
|
get |
Gets the scene layer where lights are drawn.
Definition at line 55 of file DirectLightLayer.cs.
| Action<DirectRadialLight>? Gondwana.Drawing.Direct.DirectLightLayer.LightAdded |
Occurs after a light has been added to this owner.
Definition at line 29 of file DirectLightLayer.cs.
| Action<DirectRadialLight>? Gondwana.Drawing.Direct.DirectLightLayer.LightRemoving |
Occurs before a light is disposed and removed from this owner.
Definition at line 34 of file DirectLightLayer.cs.