Gondwana Game Engine
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, mobile, and web platforms using SkiaSharp for graphics and NAudio for sound.
Loading...
Searching...
No Matches
Gondwana.Drawing.Animation.Animator Class Reference

Manages animation playback for a Tile, controlling animation cycles, frame timing, and raising events during the animation lifecycle. More...

Inheritance diagram for Gondwana.Drawing.Animation.Animator:

Public Member Functions

Cycle SetCurrentCycle (string cycleKey)
 Sets the current animation cycle using the specified cycle key.
void StartAnimation ()
 Starts playing the current animation cycle. If no cycle is set, this method has no effect. Raises the Started event when the animation begins.
void StartAnimation (string cycleKey)
 Sets the current animation cycle and starts playing it.
void StopAnimation ()
 Stops the current animation cycle. Raises the Stopped event and advances to the next cycle if one is configured. If the next cycle is configured to hide the tile on cycle end, the parent tile will be hidden.
void Dispose ()
 Releases all event handlers and suppresses finalization. *** DO NOT CALL DIRECTLY! ***.

Properties

Tile Parent [get]
 Gets the tile that owns this animator.
Cycle CurrentCycle [get, set]
 Gets or sets the current animation cycle being played.
bool IsCycling [get, set]
 Gets or sets a value indicating whether the animation is currently cycling. Setting this property to true starts the animation; setting it to false stops it.

Events

Action< AnimatorEventArgsStarted
 Occurs when an animation starts playing.
Action< AnimatorEventArgsStopped
 Occurs when an animation stops playing.
Action< AnimatorEventArgsCycled
 Occurs each time the animation advances to the next frame in the cycle.

Detailed Description

Manages animation playback for a Tile, controlling animation cycles, frame timing, and raising events during the animation lifecycle.

Member Function Documentation

◆ Dispose()

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

Releases all event handlers and suppresses finalization. *** DO NOT CALL DIRECTLY! ***.

◆ SetCurrentCycle()

Cycle Gondwana.Drawing.Animation.Animator.SetCurrentCycle ( string cycleKey)

Sets the current animation cycle using the specified cycle key.

Parameters
cycleKeyThe key identifying the animation cycle to set as current.
Returns
The cycle that was set as the current cycle.

◆ StartAnimation() [1/2]

void Gondwana.Drawing.Animation.Animator.StartAnimation ( )

Starts playing the current animation cycle. If no cycle is set, this method has no effect. Raises the Started event when the animation begins.

◆ StartAnimation() [2/2]

void Gondwana.Drawing.Animation.Animator.StartAnimation ( string cycleKey)

Sets the current animation cycle and starts playing it.

Parameters
cycleKeyThe key identifying the animation cycle to play.

◆ StopAnimation()

void Gondwana.Drawing.Animation.Animator.StopAnimation ( )

Stops the current animation cycle. Raises the Stopped event and advances to the next cycle if one is configured. If the next cycle is configured to hide the tile on cycle end, the parent tile will be hidden.

Property Documentation

◆ CurrentCycle

Cycle Gondwana.Drawing.Animation.Animator.CurrentCycle
getset

Gets or sets the current animation cycle being played.

◆ IsCycling

bool Gondwana.Drawing.Animation.Animator.IsCycling
getset

Gets or sets a value indicating whether the animation is currently cycling. Setting this property to true starts the animation; setting it to false stops it.

◆ Parent

Tile Gondwana.Drawing.Animation.Animator.Parent
get

Gets the tile that owns this animator.

Event Documentation

◆ Cycled

Action<AnimatorEventArgs> Gondwana.Drawing.Animation.Animator.Cycled

Occurs each time the animation advances to the next frame in the cycle.

◆ Started

Action<AnimatorEventArgs> Gondwana.Drawing.Animation.Animator.Started

Occurs when an animation starts playing.

◆ Stopped

Action<AnimatorEventArgs> Gondwana.Drawing.Animation.Animator.Stopped

Occurs when an animation stops playing.