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.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< AnimatorEventArgs > Started
 Occurs when an animation starts playing.
Action< AnimatorEventArgs > Stopped
 Occurs when an animation stops playing.
Action< AnimatorEventArgs > Cycled
 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.

Definition at line 8 of file Animator.cs.

Member Function Documentation

◆ Dispose()

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

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

Definition at line 216 of file Animator.cs.

◆ 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.

Definition at line 101 of file Animator.cs.

◆ 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.

Definition at line 112 of file Animator.cs.

◆ 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.

Definition at line 130 of file Animator.cs.

◆ 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.

Definition at line 141 of file Animator.cs.

Property Documentation

◆ CurrentCycle

Cycle Gondwana.Drawing.Animation.Animator.CurrentCycle
getset

Gets or sets the current animation cycle being played.

Definition at line 71 of file Animator.cs.

◆ 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.

Definition at line 77 of file Animator.cs.

◆ Parent

Tile Gondwana.Drawing.Animation.Animator.Parent
get

Gets the tile that owns this animator.

Definition at line 63 of file Animator.cs.

Event Documentation

◆ Cycled

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

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

Definition at line 25 of file Animator.cs.

◆ Started

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

Occurs when an animation starts playing.

Definition at line 15 of file Animator.cs.

◆ Stopped

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

Occurs when an animation stops playing.

Definition at line 20 of file Animator.cs.