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.DisplayEffect Class Referenceabstract

Base class for transient effects applied to a View or SceneLayer. More...

Inheritance diagram for Gondwana.Effects.DisplayEffect:
Gondwana.Effects.EarthquakeEffect Gondwana.Effects.FadeEffect Gondwana.Effects.SlideEffect Gondwana.Effects.WipeEffect Gondwana.Effects.ZoomEffect Gondwana.Effects.FadeInEffect Gondwana.Effects.FadeOutEffect Gondwana.Effects.SlideInEffect Gondwana.Effects.SlideOutEffect Gondwana.Effects.EraseEffect Gondwana.Effects.FillEffect Gondwana.Effects.ZoomInEffect Gondwana.Effects.ZoomOutEffect

Public Member Functions

void Cancel ()
 Cancels the effect and restores the presentation state that existed when it began.

Protected Member Functions

 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.
virtual void OnStarting ()
 Captures or prepares target state before the effect starts.
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

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.

Events

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

Detailed Description

Base class for transient effects applied to a View or SceneLayer.

Display effects update presentation-only state. They do not move world objects, change collision geometry, or alter a SceneLayer's canonical origin.

Definition at line 12 of file DisplayEffect.cs.

Constructor & Destructor Documentation

◆ DisplayEffect()

Gondwana.Effects.DisplayEffect.DisplayEffect ( float durationSeconds,
EasingKind easing = EasingKind::Linear )
protected

Initializes a new instance of the DisplayEffect class.

Parameters
durationSecondsThe duration in seconds.
easingThe easing function applied to progress.

Definition at line 23 of file DisplayEffect.cs.

Member Function Documentation

◆ ApplyProgress()

void Gondwana.Effects.DisplayEffect.ApplyProgress ( float progress)
abstractprotected

Applies the eased effect progress to the target.

Parameters
progressThe normalized progress of the operation.

◆ Cancel()

void Gondwana.Effects.DisplayEffect.Cancel ( )

Cancels the effect and restores the presentation state that existed when it began.

◆ GetTarget< TTarget >()

TTarget Gondwana.Effects.DisplayEffect.GetTarget< TTarget > ( )
protected

Gets the effect target as the requested reference type.

Template Parameters
TTargetThe type of target.
Returns
The effect target cast to the requested type.
Type Constraints
TTarget :class 

◆ OnCompleted()

virtual void Gondwana.Effects.DisplayEffect.OnCompleted ( )
protectedvirtual

Runs the effect-specific completion behavior.

Reimplemented in Gondwana.Effects.ZoomEffect.

Definition at line 158 of file DisplayEffect.cs.

◆ OnStarting()

virtual void Gondwana.Effects.DisplayEffect.OnStarting ( )
protectedvirtual

Captures or prepares target state before the effect starts.

Reimplemented in Gondwana.Effects.EarthquakeEffect, Gondwana.Effects.FadeEffect, Gondwana.Effects.SlideEffect, Gondwana.Effects.WipeEffect, and Gondwana.Effects.ZoomEffect.

Definition at line 145 of file DisplayEffect.cs.

◆ RestoreOriginalState()

void Gondwana.Effects.DisplayEffect.RestoreOriginalState ( )
abstractprotected

Restores the target state captured when the effect started.

Property Documentation

◆ DurationSeconds

float Gondwana.Effects.DisplayEffect.DurationSeconds
get

Gets the requested effect duration in seconds.

Definition at line 41 of file DisplayEffect.cs.

◆ Easing

EasingKind Gondwana.Effects.DisplayEffect.Easing
get

Gets the easing curve used to transform normalized progress.

Definition at line 44 of file DisplayEffect.cs.

◆ Id

Guid Gondwana.Effects.DisplayEffect.Id = Guid.NewGuid()
get

Gets the effect's unique identifier.

Definition at line 38 of file DisplayEffect.cs.

◆ Progress

float Gondwana.Effects.DisplayEffect.Progress
get

Gets the normalized, uneased progress in the range 0 through 1.

Definition at line 50 of file DisplayEffect.cs.

◆ Status

EffectStatus Gondwana.Effects.DisplayEffect.Status = EffectStatus.Pending
get

Gets the current lifecycle state.

Definition at line 47 of file DisplayEffect.cs.

Event Documentation

◆ Cancelled

Action<DisplayEffect>? Gondwana.Effects.DisplayEffect.Cancelled

Occurs when the effect is cancelled or replaced.

Definition at line 35 of file DisplayEffect.cs.

◆ Completed

Action<DisplayEffect>? Gondwana.Effects.DisplayEffect.Completed

Occurs when the effect reaches its requested duration.

Definition at line 32 of file DisplayEffect.cs.