Feel  4.3
The best way to improve your game's feel and make it extra juicy
MoreMountains.Feedbacks.MMF_AnimationCrossfade Class Reference

A feedback used to trigger an animation (bool, int, float or trigger) on the associated animator, with or without randomness More...

Inheritance diagram for MoreMountains.Feedbacks.MMF_AnimationCrossfade:
MoreMountains.Feedbacks.MMF_Feedback

Public Types

enum  TriggerModes { TriggerModes.SetTrigger, TriggerModes.ResetTrigger }
 the possible modes that pilot triggers
More...
 
enum  ValueModes { ValueModes.None, ValueModes.Constant, ValueModes.Random, ValueModes.Incremental }
 the possible ways to set a value More...
 
enum  Modes { Modes.Seconds, Modes.Normalized }
 

Public Attributes

override bool HasRandomness => true
 
override bool HasAutomatedTargetAcquisition => true
 
Animator BoundAnimator
 the animator whose parameters you want to update More...
 
List< Animator > ExtraBoundAnimators
 the list of extra animators whose parameters you want to update More...
 
float DeclaredDuration = 0f
 the duration for the player to consider. This won't impact your animation, but is a way to communicate to the MMF Player the duration of this feedback. Usually you'll want it to match your actual animation, and setting it can be useful to have this feedback work with holding pauses. More...
 
string StateName = "NewState"
 the name of the state towards which to transition. That's the name of the yellow or gray box in your Animator More...
 
int Layer = -1
 the ID of the Animator layer you want the crossfade to occur on More...
 
Modes Mode = Modes.Seconds
 whether to specify timing data for the crossfade in seconds or in normalized (0-1) values
More...
 
float TransitionDuration = 0.1f
 in Seconds mode, the duration of the transition, in seconds More...
 
float TimeOffset = 0f
 in Seconds mode, the offset at which to transition to, in seconds More...
 
float NormalizedTransitionDuration = 0.1f
 in Normalized mode, the duration of the transition, normalized between 0 and 1 More...
 
float NormalizedTimeOffset = 0f
 in Normalized mode, the offset at which to transition to, normalized between 0 and 1 More...
 
float NormalizedTransitionTime = 0f
 according to Unity's docs, 'the time of the transition, normalized'. Really nobody's sure what this does. It's optional. More...
 

Static Public Attributes

static bool FeedbackTypeAuthorized = true
 a static bool used to disable all feedbacks of this type at once More...
 

Protected Member Functions

override void AutomateTargetAcquisition ()
 A method meant to be implemented per feedback letting you specify what happens (usually setting a target) More...
 
override void CustomInitialization (MMF_Player owner)
 Custom Init More...
 
override void CustomPlayFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 On Play, checks if an animator is bound and crossfades to the specified state More...
 
virtual void CrossFade (Animator targetAnimator)
 Crossfades either via fixed time or regular (normalized) calls More...
 

Protected Attributes

int _stateHashName
 

Properties

override float FeedbackDuration [get, set]
 sets the inspector color for this feedback More...
 

Additional Inherited Members

Detailed Description

A feedback used to trigger an animation (bool, int, float or trigger) on the associated animator, with or without randomness

Member Enumeration Documentation

◆ Modes

Enumerator
Seconds 
Normalized 

◆ TriggerModes

the possible modes that pilot triggers

Enumerator
SetTrigger 
ResetTrigger 

◆ ValueModes

the possible ways to set a value

Enumerator
None 
Constant 
Random 
Incremental 

Member Function Documentation

◆ AutomateTargetAcquisition()

override void MoreMountains.Feedbacks.MMF_AnimationCrossfade.AutomateTargetAcquisition ( )
protectedvirtual

A method meant to be implemented per feedback letting you specify what happens (usually setting a target)

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CrossFade()

virtual void MoreMountains.Feedbacks.MMF_AnimationCrossfade.CrossFade ( Animator  targetAnimator)
protectedvirtual

Crossfades either via fixed time or regular (normalized) calls

Parameters
targetAnimator

◆ CustomInitialization()

override void MoreMountains.Feedbacks.MMF_AnimationCrossfade.CustomInitialization ( MMF_Player  owner)
protectedvirtual

Custom Init

Parameters
owner

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomPlayFeedback()

override void MoreMountains.Feedbacks.MMF_AnimationCrossfade.CustomPlayFeedback ( Vector3  position,
float  feedbacksIntensity = 1.0f 
)
protectedvirtual

On Play, checks if an animator is bound and crossfades to the specified state

Parameters
position
feedbacksIntensity

Implements MoreMountains.Feedbacks.MMF_Feedback.

Member Data Documentation

◆ _stateHashName

int MoreMountains.Feedbacks.MMF_AnimationCrossfade._stateHashName
protected

◆ BoundAnimator

Animator MoreMountains.Feedbacks.MMF_AnimationCrossfade.BoundAnimator

the animator whose parameters you want to update

◆ DeclaredDuration

float MoreMountains.Feedbacks.MMF_AnimationCrossfade.DeclaredDuration = 0f

the duration for the player to consider. This won't impact your animation, but is a way to communicate to the MMF Player the duration of this feedback. Usually you'll want it to match your actual animation, and setting it can be useful to have this feedback work with holding pauses.

◆ ExtraBoundAnimators

List<Animator> MoreMountains.Feedbacks.MMF_AnimationCrossfade.ExtraBoundAnimators

the list of extra animators whose parameters you want to update

◆ FeedbackTypeAuthorized

bool MoreMountains.Feedbacks.MMF_AnimationCrossfade.FeedbackTypeAuthorized = true
static

a static bool used to disable all feedbacks of this type at once

◆ HasAutomatedTargetAcquisition

override bool MoreMountains.Feedbacks.MMF_AnimationCrossfade.HasAutomatedTargetAcquisition => true

◆ HasRandomness

override bool MoreMountains.Feedbacks.MMF_AnimationCrossfade.HasRandomness => true

◆ Layer

int MoreMountains.Feedbacks.MMF_AnimationCrossfade.Layer = -1

the ID of the Animator layer you want the crossfade to occur on

◆ Mode

Modes MoreMountains.Feedbacks.MMF_AnimationCrossfade.Mode = Modes.Seconds

whether to specify timing data for the crossfade in seconds or in normalized (0-1) values

◆ NormalizedTimeOffset

float MoreMountains.Feedbacks.MMF_AnimationCrossfade.NormalizedTimeOffset = 0f

in Normalized mode, the offset at which to transition to, normalized between 0 and 1

◆ NormalizedTransitionDuration

float MoreMountains.Feedbacks.MMF_AnimationCrossfade.NormalizedTransitionDuration = 0.1f

in Normalized mode, the duration of the transition, normalized between 0 and 1

◆ NormalizedTransitionTime

float MoreMountains.Feedbacks.MMF_AnimationCrossfade.NormalizedTransitionTime = 0f

according to Unity's docs, 'the time of the transition, normalized'. Really nobody's sure what this does. It's optional.

◆ StateName

string MoreMountains.Feedbacks.MMF_AnimationCrossfade.StateName = "NewState"

the name of the state towards which to transition. That's the name of the yellow or gray box in your Animator

◆ TimeOffset

float MoreMountains.Feedbacks.MMF_AnimationCrossfade.TimeOffset = 0f

in Seconds mode, the offset at which to transition to, in seconds

◆ TransitionDuration

float MoreMountains.Feedbacks.MMF_AnimationCrossfade.TransitionDuration = 0.1f

in Seconds mode, the duration of the transition, in seconds

Property Documentation

◆ FeedbackDuration

override float MoreMountains.Feedbacks.MMF_AnimationCrossfade.FeedbackDuration
getset

sets the inspector color for this feedback

the duration of this feedback is the declared duration


The documentation for this class was generated from the following file: