Feel  3.16
The best way to improve your game's feel and make it extra juicy
MoreMountains.Tools.MMAnimationModifier Class Reference

Add this script to an animation in Mecanim and you'll be able to control its start position and speed More...

Inheritance diagram for MoreMountains.Tools.MMAnimationModifier:

Public Member Functions

override void OnStateEnter (Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 On state enter, we modify our speed and start position More...
 
override void OnStateExit (Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 On state exit, we restore our speed More...
 

Public Attributes

Vector2 StartPosition = new Vector2(0, 0)
 the min and max values for the start position of the animation (between 0 and 1) More...
 
Vector2 AnimationSpeed = new Vector2(1, 1)
 the min and max values for the animation speed (1 is normal) More...
 

Protected Attributes

bool _enteredState = false
 
float _initialSpeed
 

Detailed Description

Add this script to an animation in Mecanim and you'll be able to control its start position and speed

Member Function Documentation

◆ OnStateEnter()

override void MoreMountains.Tools.MMAnimationModifier.OnStateEnter ( Animator  animator,
AnimatorStateInfo  stateInfo,
int  layerIndex 
)

On state enter, we modify our speed and start position

Parameters
animator
stateInfo
layerIndex

◆ OnStateExit()

override void MoreMountains.Tools.MMAnimationModifier.OnStateExit ( Animator  animator,
AnimatorStateInfo  stateInfo,
int  layerIndex 
)

On state exit, we restore our speed

Parameters
animator
stateInfo
layerIndex

Member Data Documentation

◆ _enteredState

bool MoreMountains.Tools.MMAnimationModifier._enteredState = false
protected

◆ _initialSpeed

float MoreMountains.Tools.MMAnimationModifier._initialSpeed
protected

◆ AnimationSpeed

Vector2 MoreMountains.Tools.MMAnimationModifier.AnimationSpeed = new Vector2(1, 1)

the min and max values for the animation speed (1 is normal)

◆ StartPosition

Vector2 MoreMountains.Tools.MMAnimationModifier.StartPosition = new Vector2(0, 0)

the min and max values for the start position of the animation (between 0 and 1)


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