Class Texture.SpritesheetData.Sequence
Namespace: ValveResourceFormat.ResourceTypes
Assembly: ValveResourceFormat.dll
Represents an animation sequence within a sprite sheet.
public class Texture.SpritesheetData.SequenceInheritance
object ← Texture.SpritesheetData.Sequence
Properties
AlphaCrop
Gets or sets a value indicating whether alpha cropping is enabled for this sequence.
public bool AlphaCrop { get; set; }Property Value
bool
Clamp
Gets or sets a value indicating whether this sequence should clamp at the end.
public bool Clamp { get; set; }Property Value
bool
EffectiveTotalTime
Gets the playback time span of this sequence, or one second when it has no total of its own.
public float EffectiveTotalTime { get; }Property Value
float
FloatParams
Gets the dictionary of floating-point parameters associated with this sequence.
public Dictionary<string, float> FloatParams { get; }Property Value
Dictionary<string, float>
Frames
Gets or sets the array of frames in this sequence.
public Texture.SpritesheetData.Sequence.Frame[] Frames { get; set; }Property Value
Texture.SpritesheetData.Sequence.Frame[]
Id
Gets or sets the sequence number this sequence was authored with.
public uint Id { get; set; }Property Value
uint
IsNamed
Gets a value indicating whether Texture.SpritesheetData.Sequence.Name was authored with the sheet. Unnamed sequences carry the name of the element class they were built from.
public bool IsNamed { get; }Property Value
bool
Name
Gets or sets the name of this sequence.
public string Name { get; set; }Property Value
string
NoAlpha
Gets or sets a value indicating whether alpha information should be ignored.
public bool NoAlpha { get; set; }Property Value
bool
NoColor
Gets or sets a value indicating whether color information should be ignored.
public bool NoColor { get; set; }Property Value
bool
TotalTime
Gets or sets the total time this sequence spans. Frames divide it by their display times.
public float TotalTime { get; set; }Property Value
float
Methods
GetFrameAtPosition(float)
The two frames a playback position sits between and how far it has crossed from the first to the second. Every frame is held for its own display time as a share of the sequence's total, so a sequence whose frames have uneven display times does not play at a uniform rate. A clamping sequence holds its last frame; otherwise it wraps back to the first.
public (int Frame, int NextFrame, float Blend) GetFrameAtPosition(float position)Parameters
position float
Playback position in seconds, within Texture.SpritesheetData.Sequence.EffectiveTotalTime.
Returns
(int Frame, int NextFrame, float Blend)
The frame to show, the frame after it, and the fraction crossed between them.
GetFrameStartTime(int)
Gets the time at which a frame starts, measured from the start of the sequence.
public float GetFrameStartTime(int frameIndex)Parameters
frameIndex int
Index of the frame to locate.
Returns
float
The frame's start time in seconds.

