Animancer v6.0 is currently available for testing.

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
Base Types
  • ValueType
graph BT Type-->Base0["ValueType"] Type["AnimancerEvent"] class Type type-node

Syntax

public struct AnimancerEvent : ValueType

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.
normalizedTime
The Animancer.AnimancerState.NormalizedTime at which to invoke the Animancer.AnimancerEvent.callback.

Properties

Name Value Summary
CurrentEvent AnimancerEvent
The Animancer.AnimancerEvent currently being triggered by Animancer.AnimancerEvent.Invoke(Animancer.AnimancerState).
static
CurrentState AnimancerState
The Animancer.AnimancerState currently triggering an event using Animancer.AnimancerEvent.Invoke(Animancer.AnimancerState).
static

Methods

Name Value Summary
AppendDetails(StringBuilder, string, string) void
Appends the details of this event to the `text`.
GetFadeOutDuration(float) float
Returns either the `minDuration` or the Animancer.AnimancerState.RemainingDuration of the Animancer.AnimancerEvent.CurrentState state (whichever is higher).
static
Invoke(AnimancerState) void
Sets the static Animancer.AnimancerEvent.CurrentState and Animancer.AnimancerEvent.CurrentEvent then invokes the Animancer.AnimancerEvent.callback.

This method catches and logs any exception thrown by the Animancer.AnimancerEvent.callback.
ToString() string
Returns "AnimancerEvent(normalizedTime, callback)".