ClipEvent(string, float, Action, bool, Nullable) Constructor
Definition¶
Namespace: Brine2D.Animation
A named callback attached to an AnimationClip at a specific time offset. Fired by SpriteAnimator when playback crosses the event's Time.
public ClipEvent(string Name, float Time, System.Action<Brine2D.Animation.ClipEventArgs> Callback, bool FireBothDirections=false, System.Nullable<int> FrameIndex=null);
Parameters¶
Name System.String
Identifier for this event (e.g., "footstep", "hitbox_on").
Time System.Single
Time in seconds from the clip start at which this event fires.
Callback System.Action<ClipEventArgs>
The action to invoke when the event fires.
FireBothDirections System.Boolean
When true and the owning clip uses PingPong, the event also
fires during the backward sweep. Ignored for non-ping-pong clips.
FrameIndex System.Nullable<System.Int32>
When non-null this event was registered via AddEventAtFrame(string, int, Action<ClipEventArgs>, bool) and its Time is automatically re-resolved whenever any frame's Duration changes.