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
doubleThe 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
Seconds
The total amount of seconds that this frame should last for.
public readonly double Seconds
Field Value
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
Exceptions
- InvalidOperationException
Thrown if this animation frame has more than one region, in which case Regions should be used instead.