![]() |
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.
|
Configures how particles are spawned over time at a given location. More...
Public Attributes | |
| float | Min |
| Lifetime range in seconds (min, max). | |
Properties | |
| PointF | Position [get, set] |
| RenderHost / adapter pixel position where particles originate. | |
| float | EmitRate = 200f [get, set] |
| Particles per second to spawn (fractional allowed). | |
| float float Max | LifeRange = (0.6f, 1.4f) [get, set] |
| float float Max | VelocityRangeX = (-120f, 120f) [get, set] |
| float float Max | VelocityRangeY = (-300f, -180f) [get, set] |
| float float Max | SizeRange = (3f, 7f) [get, set] |
| SKColor | Color = new SKColor(200, 200, 255, 255) [get, set] |
| Base color. Alpha will be modulated by lifetime fade. You can randomize in OnSpawn if desired. | |
| SKBlendMode | BlendMode = SKBlendMode.Plus [get, set] |
| Blend mode used when rendering particles from this emitter. Defaults to SKBlendMode.Plus for additive/glowy effects. | |
| float | JitterX = 0f [get, set] |
| Gets or sets the horizontal jitter value for spawning particles, which represents a random offset applied along the X-axis. | |
| float | JitterY = 0f [get, set] |
| Gets or sets the vertical jitter value for spawning particles, which represents a random offset applied along the Y-axis. | |
| float? | GravityX = null [get, set] |
| Gets or sets the horizontal component of the gravity vector in pixels per second squared (px/s²). Negative values pull left, positive values pull right. If null, the emitter uses the global gravity setting from the ParticleSurface. Default ParticleSurface.GravityX is 0."/> | |
| float? | GravityY = null [get, set] |
| Gets or sets the vertical component of the gravity vector in pixels per second squared (px/s²). Negative values pull up, positive values pull down. If null, the emitter uses the global gravity setting from the ParticleSurface. Default ParticleSurface.GravityY is 400."/> | |
| SKBitmap? | ParticleSprite [get, set] |
| Optional sprite used for particles spawned by this emitter. If null, the particle surface’s default sprite is used (or a circle if none). | |
| SKColor? | Tint [get, set] |
Optional per-emitter tint. If set, it overrides the particle system's GlobalColorTint for particles spawned by this emitter. | |
| float? | MaxVelocity [get, set] |
| Optional per-emitter maximum speed in px/s. If set, particle velocity will be clamped to this magnitude after acceleration is applied each update. | |
| ParticleSpawnDistribution | SpawnDistribution = ParticleSpawnDistribution.Rectangle [get, set] |
| Controls the random spawn distribution used by JitterX/JitterY. | |
| float | RingInnerRadius01 = 0.85f [get, set] |
| For Ring distribution: inner radius as a fraction of the outer radius [0..1]. 0 = filled disk, 0.8 = thin-ish ring, 0.95 = very thin ring. | |
| float | GaussianStdDev01 = 0.33f [get, set] |
| For Gaussian distribution: standard deviation as a fraction of outer radius. Typical values: 0.25 to 0.5. Higher spreads wider. | |
| ParticleSpawnHandler? | OnSpawn [get, set] |
| Optional per-particle customization hook (e.g., perlin drift, hue jitter). | |
| Action< ParticleEmitter, float >? | OnUpdate [get, set] |
| Optional per-frame callback to tweak emitter (e.g., move with an object). | |
Configures how particles are spawned over time at a given location.
A ParticleEmitter defines how particles are spawned over time at a specific position. Each emitter manages its own emission rate, lifetime ranges, velocity ranges, size ranges, and base color.
You can also attach two optional hooks:
ref to the particle for last-mile initialization (e.g., randomizing rotation, adjusting color, assigning metadata, etc.). Emitters are usually created in pairs or groups and added to a ParticleSurface system to combine effects. For example, one emitter can generate fast-fading sparks while another generates slow-rising smoke.
The following demonstrates how to configure multiple emitters for different particle effects (e.g., fire sparks and campfire smoke).
Definition at line 92 of file ParticleEmitter.cs.
| float Gondwana.Drawing.Direct.Particles.ParticleEmitter.Min |
Lifetime range in seconds (min, max).
Size range in pixels (min, max). Interpreted as diameter for circles, edge for quads.
Initial Y velocity range in px/s (min, max). Negative shoots upward.
Initial X velocity range in px/s (min, max).
Definition at line 101 of file ParticleEmitter.cs.
|
getset |
Blend mode used when rendering particles from this emitter. Defaults to SKBlendMode.Plus for additive/glowy effects.
Definition at line 121 of file ParticleEmitter.cs.
|
getset |
Base color. Alpha will be modulated by lifetime fade. You can randomize in OnSpawn if desired.
Definition at line 115 of file ParticleEmitter.cs.
|
getset |
Particles per second to spawn (fractional allowed).
Definition at line 98 of file ParticleEmitter.cs.
|
getset |
For Gaussian distribution: standard deviation as a fraction of outer radius. Typical values: 0.25 to 0.5. Higher spreads wider.
Definition at line 180 of file ParticleEmitter.cs.
|
getset |
Gets or sets the horizontal component of the gravity vector in pixels per second squared (px/s²). Negative values pull left, positive values pull right. If null, the emitter uses the global gravity setting from the ParticleSurface. Default ParticleSurface.GravityX is 0."/>
Definition at line 138 of file ParticleEmitter.cs.
|
getset |
Gets or sets the vertical component of the gravity vector in pixels per second squared (px/s²). Negative values pull up, positive values pull down. If null, the emitter uses the global gravity setting from the ParticleSurface. Default ParticleSurface.GravityY is 400."/>
Definition at line 145 of file ParticleEmitter.cs.
|
getset |
Gets or sets the horizontal jitter value for spawning particles, which represents a random offset applied along the X-axis.
Definition at line 126 of file ParticleEmitter.cs.
|
getset |
Gets or sets the vertical jitter value for spawning particles, which represents a random offset applied along the Y-axis.
Definition at line 131 of file ParticleEmitter.cs.
|
getset |
Definition at line 101 of file ParticleEmitter.cs.
|
getset |
Optional per-emitter maximum speed in px/s. If set, particle velocity will be clamped to this magnitude after acceleration is applied each update.
Definition at line 163 of file ParticleEmitter.cs.
|
getset |
Optional per-particle customization hook (e.g., perlin drift, hue jitter).
Definition at line 183 of file ParticleEmitter.cs.
|
getset |
Optional per-frame callback to tweak emitter (e.g., move with an object).
Definition at line 186 of file ParticleEmitter.cs.
|
getset |
Optional sprite used for particles spawned by this emitter. If null, the particle surface’s default sprite is used (or a circle if none).
Definition at line 151 of file ParticleEmitter.cs.
|
getset |
RenderHost / adapter pixel position where particles originate.
Definition at line 95 of file ParticleEmitter.cs.
|
getset |
For Ring distribution: inner radius as a fraction of the outer radius [0..1]. 0 = filled disk, 0.8 = thin-ish ring, 0.95 = very thin ring.
Definition at line 174 of file ParticleEmitter.cs.
|
getset |
Definition at line 110 of file ParticleEmitter.cs.
|
getset |
Controls the random spawn distribution used by JitterX/JitterY.
Definition at line 168 of file ParticleEmitter.cs.
|
getset |
Optional per-emitter tint. If set, it overrides the particle system's GlobalColorTint for particles spawned by this emitter.
Definition at line 157 of file ParticleEmitter.cs.
|
getset |
Definition at line 104 of file ParticleEmitter.cs.
|
getset |
Definition at line 107 of file ParticleEmitter.cs.