AnimancerEvent Struct

Summary

A Animancer.AnimancerEvent.callback delegate paired with a Animancer.AnimancerEvent.normalizedTime to determine when to invoke it.
Assembly
Animancer.dll
Namespace
Animancer
Interfaces
Base Types
  • ValueType
graph BT Type-->Base0["ValueType"] Type-.->Interface0["IEquatable<AnimancerEvent>"] Type["AnimancerEvent"] class Type type-node

Syntax

public struct AnimancerEvent : ValueType, IEquatable<AnimancerEvent>

Remarks

Documentation: Animancer Events

Constructors

Name Summary
AnimancerEvent(float, Action) Creates a new Animancer.AnimancerEvent.

Fields

Name Constant Value Summary
AlmostOne 0.9999999
The largest possible float value less than 1.
static
callback
The delegate to invoke when the Animancer.AnimancerEvent.normalizedTime passes.
DummyCallback
Does nothing.
static
EndEventName
The event name used for Animancer.AnimancerEvent.Sequence.EndEvents.
static
InvokeBoundCallback
A cached delegate which calls Animancer.AnimancerEvent.Invocation.InvokeBoundCallback on the Animancer.AnimancerEvent.Current.
static
normalizedTime
The Animancer.AnimancerState.NormalizedTime at which to invoke the Animancer.AnimancerEvent.callback.

Properties

Name Value Summary
Current AnimancerEvent.Invocation
The details of the event currently being triggered.
static
CurrentParameter Object
The custom parameter of the event currently being triggered.
static

Methods

Name Value Summary
AppendDetails(StringBuilder) void
Appends the details of this event to the `text`.
AssertContainsParameter<T>(Action) void
[Assert-Only] Logs an error if the `callback` doesn't contain a Animancer.AnimancerEvent.Parameter`1.Invoke so that adding to it with Animancer.AnimancerEvent.Parametize``1(System.Action{``0}) can use that parameter.
static
AssertEventPlayMismatch(AnimancerGraph) void
[Assert-Conditional] This method should be called when an animation is played. It asserts that either no event is currently being triggered or that the event is being triggered inside `playing`. Otherwise, it logs Animancer.OptionalWarning.EventPlayMismatch.
static
AssertNormalizedTimes(AnimancerState) void
[Assert-Conditional] Throws an System.ArgumentOutOfRangeException if any event is outside the range of 0 <= normalizedTime < 1.
AssertNormalizedTimes(AnimancerState, bool) void
[Assert-Conditional] Calls Animancer.AnimancerEvent.AssertNormalizedTimes(Animancer.AnimancerState) if `isLooping` is true.
ContentsAreEqual(AnimancerEvent.Sequence) bool
Are all events in this sequence identical to the ones in the `other` sequence?
CopyTo(AnimancerEvent[], int) void
[System.Collections.Generic.ICollection`1] [Pro-Only] Copies all the events from this sequence into the `array`, starting at the `index`.
DelayInvoke(StringReference, AnimancerState) void
Adds this event to the Animancer.AnimancerEvent.Invoker which will call Animancer.AnimancerEvent.Invocation.Invoke later in the current frame.
Equals(AnimancerEvent) bool
[System.IEquatable`1] Are the Animancer.AnimancerEvent.normalizedTime and Animancer.AnimancerEvent.callback of this event equal to `other`?
Equals(Object) bool
GetCurrentParameter<T>() T
Calls Animancer.ConvertableUtilities.ConvertOrThrow``1(System.Object) on the Animancer.AnimancerEvent.CurrentParameter.
static
GetFadeOutDuration() float
Returns either the Animancer.AnimancerGraph.DefaultFadeDuration or the Animancer.AnimancerState.RemainingDuration of the Animancer.AnimancerEvent.Current state (whichever is higher).
static
GetFadeOutDuration(AnimancerState, float) float
Returns either the `minDuration` or the Animancer.AnimancerState.RemainingDuration of the `state` (whichever is higher).
static
GetFadeOutDuration(float) float
Returns either the `minDuration` or the Animancer.AnimancerState.RemainingDuration of the Animancer.AnimancerEvent.Current state (whichever is higher).
static
GetHashCode() int
IsNullOrDummy(Action) bool
Is the `callback` null or the Animancer.AnimancerEvent.DummyCallback?
static
Parametize(Action<string>) Action
Returns a new delegate which invokes the `callback` using the Animancer.AnimancerEvent.CurrentParameter.
static
Parametize<T>(Action<T>) Action
Returns a new delegate which invokes the `callback` using Animancer.AnimancerEvent.GetCurrentParameter``1.
static
ToString() string
Returns a string describing the details of this event.

Operators

Name Value Summary
operator !=(AnimancerEvent, AnimancerEvent) bool
operator ==(AnimancerEvent, AnimancerEvent) bool