Struct SampledAnimationEvents<T> ​
Namespace: ValveResourceFormat.Renderer
Assembly: Renderer.dll
Enumerates the events whose start is crossed while playback advances over a time range, handling loop wrap-around. Used by as it advances its clips; allocation free, so it can run every frame.
public struct SampledAnimationEvents<T> where T : IAnimationEventType Parameters ​
T
The event type of the animation being played.
Constructors ​
SampledAnimationEvents(T[], float, float, float, bool) ​
Initializes a new instance of the struct.
public SampledAnimationEvents(T[] events, float duration, float previousTime, float newTime, bool finished)Parameters ​
events T[]
The events of the animation.
duration float
The duration in seconds of the animation, which the playback times are cycles of.
previousTime float
The playback time in seconds before the update.
newTime float
The playback time in seconds after the update.
finished bool
Marks the final update of a non-looping animation: the range is treated as closed so events authored at the exact end still fire, as the end is clamped to the last frame, which a half-open range would exclude forever.
Properties ​
Current ​
Gets the event that fired.
public readonly T Current { get; }Property Value ​
T
Methods ​
GetEnumerator() ​
Returns this enumerator, so the fired events can be iterated with foreach.
public readonly SampledAnimationEvents<T> GetEnumerator()Returns ​
MoveNext() ​
Advances to the next event that fired in this range.
public bool MoveNext()
