Learn / Documentation / Script Reference / AnimatorEvent

AnimatorEvent

class in Doozy.Engine.Events 

Description

Event-like class that allows interacting with an Animator parameters in a dynamic way.
See Also: Animator

Public Variables

  • public Animator Animator – Target Animator

  • public bool BoolValue – Value assigned to the target parameter if the TargetParameterType is set to ParameterType.Bool

  • public float FloatValue – Value assigned to the target parameter if the TargetParameterType is set to ParameterType.Float

  • public int IntValue – Value assigned to the target parameter if the TargetParameterType is set to ParameterType.Int

  • public string ParameterName – Name of the parameter (trigger) used to assign the value, if the TargetParameterType is set to ParameterType.Trigger

  • public bool ResetTrigger – If enabled and the TargetParameterType is set to ParameterType.Trigger, ResetTrigger will get performed on the Animator before setting the new trigger value

  • public ParameterType TargetParameterType – Target parameter type

Constructors

  • public AnimatorEvent() – Constructs a new AnimatorEvent with default values

  • public AnimatorEvent(Animator animator, string parameterName, bool boolValue) – Constructs a new AnimatorEvent and initializes it to target a parameter name and set its bool value

  • public AnimatorEvent(Animator animator, string parameterName, int intValue) – Constructs a new AnimatorEvent and initializes it to target a parameter name and set its int value

  • public AnimatorEvent(Animator animator, string parameterName, float floatValue) – Constructs a new AnimatorEvent and initializes it to target a parameter name and set its float value

  • public AnimatorEvent(Animator animator, string parameterName) – Constructs a new AnimatorEvent and initializes it to target a parameter name that is the Trigger name

Public Methods

  • public void Invoke(UnityAction callback = null) – Invokes the AnimatorEvent

  • public void Reset() – Resets this instance to the default values

  • public void SetValue() – Sets the selected value, in the Animator, as defined by the TargetParameterType, ParameterName and set value (BoolValue, FloatValue, IntValue or Trigger)