Class Event
Namespace: ValveResourceFormat.Animation
Assembly: ValveResourceFormat.dll
public class Event : IAnimationEventInheritance
object ← Event
Derived
BodyGroupEvent, CameraDOFEvent, CameraFOVEvent, ClothEvent, ContactEvent, EntityAttributeEventBase, FloatCurveEvent, FootEvent, FrameSnapEvent, IDEvent, LegacyEvent, MaterialAttributeEvent, OrientationWarpEvent, ParticleEvent, RootMotionEvent, SoundEvent, TargetWarpEvent, TransitionEvent
Implements
Constructors
Event(KVObject)
Reads the Event from its KeyValues3 data.
public Event(KVObject data)Parameters
data KVObject
Properties
ClassName
The compiled class of the event, such as CNmSoundEvent.
public string ClassName { get; }Property Value
string
Duration
[KVProperty("m_flDuration")]
public Percent Duration { get; }Property Value
DurationSeconds
How long the event lasts in seconds, zero for an immediate event.
public float DurationSeconds { get; }Property Value
float
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
StartSeconds
When the event starts, in seconds from the start of its clip.
public float StartSeconds { get; }Property Value
float
StartTime
[KVProperty("m_flStartTime")]
public Percent StartTime { get; }Property Value
SyncID
public StringToken SyncID { get; }Property Value
Methods
Create(KVObject, float)
Creates the event for one m_events entry of a clip that lasts clipDuration seconds.
public static Event Create(KVObject data, float clipDuration)Parameters
data KVObject
clipDuration float
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()Returns
string
A string that represents the current object.

