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
Gondwana.Effects.EarthquakeEffect Class Referencesealed

Applies a decaying, presentation-only camera shake to a View. More...

Inheritance diagram for Gondwana.Effects.EarthquakeEffect:
Gondwana.Effects.DisplayEffect

Public Member Functions

 EarthquakeEffect (float durationSeconds, float intensityPx=8f, bool decay=true, int? randomSeed=null)
 Creates a camera-shake effect.
Public Member Functions inherited from Gondwana.Effects.DisplayEffect
void Cancel ()
 Cancels the effect and restores the presentation state that existed when it began.

Protected Member Functions

override void OnStarting ()
 Captures or prepares target state before the effect starts.
override void ApplyProgress (float progress)
override void RestoreOriginalState ()
Protected Member Functions inherited from Gondwana.Effects.DisplayEffect
 DisplayEffect (float durationSeconds, EasingKind easing=EasingKind.Linear)
 Initializes a new instance of the DisplayEffect class.
TTarget GetTarget< TTarget > ()
 Gets the effect target as the requested reference type.
void ApplyProgress (float progress)
 Applies the eased effect progress to the target.
virtual void OnCompleted ()
 Runs the effect-specific completion behavior.
void RestoreOriginalState ()
 Restores the target state captured when the effect started.

Properties

float IntensityPx [get]
 Gets the maximum shake displacement in screen pixels.
bool Decay [get]
 Gets whether shake intensity falls to zero over the effect duration.
Properties inherited from Gondwana.Effects.DisplayEffect
Guid Id = Guid.NewGuid() [get]
 Gets the effect's unique identifier.
float DurationSeconds [get]
 Gets the requested effect duration in seconds.
EasingKind Easing [get]
 Gets the easing curve used to transform normalized progress.
EffectStatus Status = EffectStatus.Pending [get]
 Gets the current lifecycle state.
float Progress [get]
 Gets the normalized, uneased progress in the range 0 through 1.

Additional Inherited Members

Events inherited from Gondwana.Effects.DisplayEffect
Action< DisplayEffect >? Completed
 Occurs when the effect reaches its requested duration.
Action< DisplayEffect >? Cancelled
 Occurs when the effect is cancelled or replaced.

Detailed Description

Applies a decaying, presentation-only camera shake to a View.

Definition at line 10 of file EarthquakeEffect.cs.

Constructor & Destructor Documentation

◆ EarthquakeEffect()

Gondwana.Effects.EarthquakeEffect.EarthquakeEffect ( float durationSeconds,
float intensityPx = 8f,
bool decay = true,
int? randomSeed = null )

Creates a camera-shake effect.

Parameters
durationSecondsThe duration in seconds.
intensityPxThe intensity px.
decayWhether the effect amplitude decreases over its duration.
randomSeedThe random seed.

Definition at line 21 of file EarthquakeEffect.cs.

Member Function Documentation

◆ ApplyProgress()

override void Gondwana.Effects.EarthquakeEffect.ApplyProgress ( float progress)
protected

Definition at line 54 of file EarthquakeEffect.cs.

◆ OnStarting()

override void Gondwana.Effects.EarthquakeEffect.OnStarting ( )
protectedvirtual

Captures or prepares target state before the effect starts.

Reimplemented from Gondwana.Effects.DisplayEffect.

Definition at line 47 of file EarthquakeEffect.cs.

◆ RestoreOriginalState()

override void Gondwana.Effects.EarthquakeEffect.RestoreOriginalState ( )
protected

Property Documentation

◆ Decay

bool Gondwana.Effects.EarthquakeEffect.Decay
get

Gets whether shake intensity falls to zero over the effect duration.

Definition at line 40 of file EarthquakeEffect.cs.

◆ IntensityPx

float Gondwana.Effects.EarthquakeEffect.IntensityPx
get

Gets the maximum shake displacement in screen pixels.

Definition at line 37 of file EarthquakeEffect.cs.