Struct WeaverAnimationData.Clip
An animation clip that contains a series of sprites to play
Namespace: WeaverCore.Utilities
Assembly: WeaverCore.dll
Syntax
public struct WeaverAnimationData.Clip
Constructors
| Edit this page View SourceClip(string, float, WrapMode, IEnumerable<Sprite>, int)
Declaration
public Clip(string name, float fps, WeaverAnimationData.WrapMode wrapMode = WrapMode.Once, IEnumerable<Sprite> frames = null, int loopStart = 0)
Parameters
Type | Name | Description |
---|---|---|
string | name | |
float | fps | |
WeaverAnimationData.WrapMode | wrapMode | |
IEnumerable<Sprite> | frames | |
int | loopStart |
Fields
| Edit this page View SourceFPS
How many frames per second should the animation be playing at
Declaration
public float FPS
Field Value
Type | Description |
---|---|
float |
Frames
The sprites to be played
Declaration
public List<Sprite> Frames
Field Value
Type | Description |
---|---|
List<Sprite> |
LoopStart
The frame index where the loop begins
Declaration
public int LoopStart
Field Value
Type | Description |
---|---|
int |
Name
The name of the clip
Declaration
public string Name
Field Value
Type | Description |
---|---|
string |
WrapMode
Determines how the animation will loop
Declaration
public WeaverAnimationData.WrapMode WrapMode
Field Value
Type | Description |
---|---|
WeaverAnimationData.WrapMode |
Properties
| Edit this page View SourceDuration
Declaration
public float Duration { get; }
Property Value
Type | Description |
---|---|
float |
Methods
| Edit this page View SourceAddFrame(Sprite)
Adds a frame to the clip
Declaration
public void AddFrame(Sprite sprite)
Parameters
Type | Name | Description |
---|---|---|
Sprite | sprite | The frame to add |
AddFrames(IEnumerable<Sprite>)
Adds some frames to the clip
Declaration
public void AddFrames(IEnumerable<Sprite> frames)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<Sprite> | frames | The frames to add |