Inventory Engine v4.2
Loading...
Searching...
No Matches
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...

Inherits StateMachineBehaviour.

Public Member Functions

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

Public Attributes

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

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: