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 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 ​
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; }Property Value ​
Remarks ​
Always zero, sequence events fire at a single frame.
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 ​
Name ​
Gets the name of the event.
public string Name { get; init; }Property Value ​
Options ​
Gets the event options.
public string Options { get; init; }Property Value ​
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 ​
Remarks ​
The authored , sequence events carry one alongside their .
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 ​
Remarks ​
Always zero, sequence events are authored on a rather than in seconds.
See Also ​
https://s2v.app/SchemaExplorer/cs2/animationsystem/CAnimEventDefinition

