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.FrameSequence Struct Reference

Represents a sequence of animation frames that can be cycled through using different animation patterns. More...

Inheritance diagram for Gondwana.Drawing.Animation.FrameSequence:

Public Member Functions

 FrameSequence (Frame frame)
 Initializes a new instance of the FrameSequence struct with a single frame.
 FrameSequence (List< Frame > frames)
 Initializes a new instance of the FrameSequence struct with a collection of frames.
Frame AddFrame (Tilesheet bmp, int xTile, int yTile)
 Creates and adds a new frame to the sequence using tilesheet coordinates.
Frame AddFrame (Frame frame)
 Adds an existing frame to the sequence.
void RemoveFrame (int idx)
 Removes the frame at the specified index from the sequence.
void Reset ()
 Resets the sequence to its initial state, starting from the first frame.
IEnumerator GetEnumerator ()
 Returns an enumerator that iterates through the frame sequence.
IEnumerator< Frame > IEnumerable< Frame >. GetEnumerator ()
 Returns a strongly-typed enumerator that iterates through the frame sequence.

Public Attributes

CycleType SequenceCycleType
 The type of cycle pattern used when animating through the frame sequence.

Properties

bool CycleFinished [get]
 Gets a value indicating whether the animation cycle has finished playing through the sequence.
int FrameCount [get]
 Gets the total number of frames in the sequence.
Frame CurrentFrame [get]
 Gets the frame currently active in the animation sequence.
int CurrentFrameIdx [get]
 Gets the zero-based index of the current frame in the sequence.
IList< FrameFrameList [get]
 Gets a read-only view of the list of frames in the sequence.
Frame this[int frameIdx] [get]
 Gets the frame at the specified index in the sequence.

Detailed Description

Represents a sequence of animation frames that can be cycled through using different animation patterns.

Constructor & Destructor Documentation

◆ FrameSequence() [1/2]

Gondwana.Drawing.Animation.FrameSequence.FrameSequence ( Frame frame)

Initializes a new instance of the FrameSequence struct with a single frame.

Parameters
frameThe single frame to include in the sequence

◆ FrameSequence() [2/2]

Gondwana.Drawing.Animation.FrameSequence.FrameSequence ( List< Frame > frames)

Initializes a new instance of the FrameSequence struct with a collection of frames.

Parameters
framesThe list of frames to include in the sequence

Member Function Documentation

◆ AddFrame() [1/2]

Frame Gondwana.Drawing.Animation.FrameSequence.AddFrame ( Frame frame)

Adds an existing frame to the sequence.

Parameters
frameThe frame to add to the sequence
Returns
The added Frame

◆ AddFrame() [2/2]

Frame Gondwana.Drawing.Animation.FrameSequence.AddFrame ( Tilesheet bmp,
int xTile,
int yTile )

Creates and adds a new frame to the sequence using tilesheet coordinates.

Parameters
bmpThe tilesheet containing the frame image
xTileThe x-coordinate of the tile in the tilesheet
yTileThe y-coordinate of the tile in the tilesheet
Returns
The newly created and added Frame

◆ GetEnumerator() [1/2]

IEnumerator Gondwana.Drawing.Animation.FrameSequence.GetEnumerator ( )

Returns an enumerator that iterates through the frame sequence.

Returns
An IEnumerator for the frame sequence

◆ GetEnumerator() [2/2]

IEnumerator< Frame > IEnumerable< Frame >. Gondwana.Drawing.Animation.FrameSequence.GetEnumerator ( )

Returns a strongly-typed enumerator that iterates through the frame sequence.

Returns
An IEnumerator<Frame> for the frame sequence

◆ RemoveFrame()

void Gondwana.Drawing.Animation.FrameSequence.RemoveFrame ( int idx)

Removes the frame at the specified index from the sequence.

Parameters
idxThe zero-based index of the frame to remove

◆ Reset()

void Gondwana.Drawing.Animation.FrameSequence.Reset ( )

Resets the sequence to its initial state, starting from the first frame.

Member Data Documentation

◆ SequenceCycleType

CycleType Gondwana.Drawing.Animation.FrameSequence.SequenceCycleType

The type of cycle pattern used when animating through the frame sequence.

Property Documentation

◆ CurrentFrame

Frame Gondwana.Drawing.Animation.FrameSequence.CurrentFrame
get

Gets the frame currently active in the animation sequence.

◆ CurrentFrameIdx

int Gondwana.Drawing.Animation.FrameSequence.CurrentFrameIdx
get

Gets the zero-based index of the current frame in the sequence.

◆ CycleFinished

bool Gondwana.Drawing.Animation.FrameSequence.CycleFinished
get

Gets a value indicating whether the animation cycle has finished playing through the sequence.

◆ FrameCount

int Gondwana.Drawing.Animation.FrameSequence.FrameCount
get

Gets the total number of frames in the sequence.

◆ FrameList

IList<Frame> Gondwana.Drawing.Animation.FrameSequence.FrameList
get

Gets a read-only view of the list of frames in the sequence.

◆ this[int frameIdx]

Frame Gondwana.Drawing.Animation.FrameSequence.this[int frameIdx]
get

Gets the frame at the specified index in the sequence.

Parameters
frameIdxThe zero-based index of the frame to retrieve
Returns
The Frame at the specified index