Struct AnimationEvent ​
Namespace: ValveResourceFormat.ResourceTypes.ModelAnimation
Assembly: ValveResourceFormat.dll
Represents an event that occurs at a specific frame in an animation.
public readonly struct AnimationEvent : IAnimationEventImplements ​
Constructors ​
AnimationEvent(KVObject) ​
Initializes a new instance of the AnimationEvent struct.
public AnimationEvent(KVObject data)Parameters ​
data KVObject
Properties ​
Cycle ​
Gets the normalized cycle time of the event.
public float Cycle { get; init; }Property Value ​
float
Duration ​
Gets the duration in seconds of the event window. Zero for events that fire at a single point in time.
public float Duration { get; init; }Property Value ​
float
EndFrame ​
Gets the frame at which the event window ends, or -1 for an event with no window.
public int EndFrame { get; init; }Property Value ​
int
EventData ​
Gets the event data.
public KVObject EventData { get; init; }Property Value ​
KVObject
Frame ​
Gets the frame at which the event occurs.
public int Frame { get; init; }Property Value ​
int
Name ​
Gets the name of the event.
public string Name { get; init; }Property Value ​
string
Options ​
Gets the event options.
public string Options { get; init; }Property Value ​
string
StartCycle ​
Gets the position of the event as a fraction of the animation, zero being its start and one its end. This is what playback is sampled against, so the two formats compare in the same space.
public float StartCycle { get; }Property Value ​
float
Remarks ​
The authored AnimationEvent.Cycle, sequence events carry one alongside their AnimationEvent.Frame.
StartTime ​
Gets the time in seconds from the start of the animation at which the event fires. Zero for events that are not authored in seconds, see the implementation.
public float StartTime { get; }Property Value ​
float
Remarks ​
Always zero, sequence events are authored on a AnimationEvent.Frame rather than in seconds.

