Table of Contents

Class AnimationFrame

Namespace
MLEM.Animations
Assembly
MLEM.dll

Represents a single frame of a SpriteAnimation

public class AnimationFrame : GenericDataHolder, IGenericDataHolder
Inheritance
AnimationFrame
Implements
Inherited Members

Constructors

AnimationFrame(double, params TextureRegion[])

Creates a new animation frame based on a set of texture regions and a time.

public AnimationFrame(double seconds, params TextureRegion[] regions)

Parameters

seconds double

The total amount of seconds that this frame should last for

regions TextureRegion[]

The texture regions that this frame should render

Fields

Regions

The texture regions that this frame should render. If there is only one region, Region can be used for convenience.

public readonly IList<TextureRegion> Regions

Field Value

IList<TextureRegion>

Seconds

The total amount of seconds that this frame should last for.

public readonly double Seconds

Field Value

double

Properties

Region

The texture region that this frame should render. If there are multiple regions, Regions should be used instead.

public TextureRegion Region { get; }

Property Value

TextureRegion

Exceptions

InvalidOperationException

Thrown if this animation frame has more than one region, in which case Regions should be used instead.