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.Drawing.Animation.Cycle Class Reference

References a FrameSequence object, along with a particular Throttle value for animating through Frame objects. More...

Inheritance diagram for Gondwana.Drawing.Animation.Cycle:

Public Member Functions

 Cycle (FrameSequence sequence, double throttleTime, string cycleKey, bool hideTileOnCycleEnd=false)
 Initializes a new instance of the Cycle class.
object Clone ()
 Creates a shallow copy of the current Cycle instance.
void Dispose ()
 Releases all resources used by the Cycle and removes it from the static cycle collection.

Static Public Member Functions

static List< string > GetAnimationCycleKeys ()
 Retrieves a list of all registered animation cycle keys.
static List< Cycle > GetAnimationCycles ()
 Retrieves a list of all registered animation cycles.
static Cycle GetAnimationCycle (string cycleKey)
 Retrieves a clone of the animation cycle with the specified key.
static void ClearAnimationCycle (string cycleKey)
 Removes and disposes the animation cycle with the specified key.
static void ClearAllAnimationCycles ()
 Removes and disposes all registered animation cycles.

Public Attributes

FrameSequence Sequence
 The frame sequence used by this animation cycle.
readonly string CycleKey
 The unique identifier key for this cycle.
readonly bool HideTileOnCycleEnd
 Indicates whether the tile should be hidden when the cycle completes.

Properties

double CurrentFrameDurationSeconds [get]
 Effective duration of the currently displayed frame.
double ThrottleTime [get, set]
 Gets or sets the time in seconds between frame transitions in the animation cycle.
double TotalCycleTime [get]
 Returns the total time in seconds for the Cycle.
Cycle NextCycle [get, set]
 Gets or sets the next cycle to transition to when this cycle completes.
static int Count [get]
 Gets the total number of animation cycles currently registered.

Detailed Description

References a FrameSequence object, along with a particular Throttle value for animating through Frame objects.

Definition at line 13 of file Cycle.cs.

Constructor & Destructor Documentation

◆ Cycle()

Gondwana.Drawing.Animation.Cycle.Cycle ( FrameSequence sequence,
double throttleTime,
string cycleKey,
bool hideTileOnCycleEnd = false )

Initializes a new instance of the Cycle class.

Parameters
sequenceThe frame sequence to animate through
throttleTimeThe time in seconds between frame transitions
cycleKeyThe unique identifier for this cycle
hideTileOnCycleEndIf true, hides the tile when the cycle completes. Default is false.

Definition at line 51 of file Cycle.cs.

Member Function Documentation

◆ ClearAllAnimationCycles()

void Gondwana.Drawing.Animation.Cycle.ClearAllAnimationCycles ( )
static

Removes and disposes all registered animation cycles.

Definition at line 246 of file Cycle.cs.

◆ ClearAnimationCycle()

void Gondwana.Drawing.Animation.Cycle.ClearAnimationCycle ( string cycleKey)
static

Removes and disposes the animation cycle with the specified key.

Parameters
cycleKeyThe unique identifier of the cycle to clear

Definition at line 237 of file Cycle.cs.

◆ Clone()

object Gondwana.Drawing.Animation.Cycle.Clone ( )

Creates a shallow copy of the current Cycle instance.

Returns
A new Cycle object that is a copy of this instance

Definition at line 172 of file Cycle.cs.

◆ Dispose()

void Gondwana.Drawing.Animation.Cycle.Dispose ( )

Releases all resources used by the Cycle and removes it from the static cycle collection.

Definition at line 184 of file Cycle.cs.

◆ GetAnimationCycle()

Cycle Gondwana.Drawing.Animation.Cycle.GetAnimationCycle ( string cycleKey)
static

Retrieves a clone of the animation cycle with the specified key.

Parameters
cycleKeyThe unique identifier of the cycle to retrieve
Returns
A cloned Cycle instance if found; otherwise, null

Definition at line 225 of file Cycle.cs.

◆ GetAnimationCycleKeys()

List< string > Gondwana.Drawing.Animation.Cycle.GetAnimationCycleKeys ( )
static

Retrieves a list of all registered animation cycle keys.

Returns
A list containing all cycle keys

◆ GetAnimationCycles()

List< Cycle > Gondwana.Drawing.Animation.Cycle.GetAnimationCycles ( )
static

Retrieves a list of all registered animation cycles.

Returns
A list containing all registered Cycle instances

Member Data Documentation

◆ CycleKey

readonly string Gondwana.Drawing.Animation.Cycle.CycleKey

The unique identifier key for this cycle.

Definition at line 30 of file Cycle.cs.

◆ HideTileOnCycleEnd

readonly bool Gondwana.Drawing.Animation.Cycle.HideTileOnCycleEnd

Indicates whether the tile should be hidden when the cycle completes.

Definition at line 36 of file Cycle.cs.

◆ Sequence

FrameSequence Gondwana.Drawing.Animation.Cycle.Sequence

The frame sequence used by this animation cycle.

Definition at line 24 of file Cycle.cs.

Property Documentation

◆ Count

int Gondwana.Drawing.Animation.Cycle.Count
staticget

Gets the total number of animation cycles currently registered.

Definition at line 206 of file Cycle.cs.

◆ CurrentFrameDurationSeconds

double Gondwana.Drawing.Animation.Cycle.CurrentFrameDurationSeconds
get

Effective duration of the currently displayed frame.

Definition at line 91 of file Cycle.cs.

◆ NextCycle

Cycle Gondwana.Drawing.Animation.Cycle.NextCycle
getset

Gets or sets the next cycle to transition to when this cycle completes.

Definition at line 162 of file Cycle.cs.

◆ ThrottleTime

double Gondwana.Drawing.Animation.Cycle.ThrottleTime
getset

Gets or sets the time in seconds between frame transitions in the animation cycle.

Definition at line 107 of file Cycle.cs.

◆ TotalCycleTime

double Gondwana.Drawing.Animation.Cycle.TotalCycleTime
get

Returns the total time in seconds for the Cycle.

Definition at line 121 of file Cycle.cs.