Add this script to an animation in Mecanim and you'll be able to control its start position and speed
More...
|
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...
|
|
|
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...
|
|
Add this script to an animation in Mecanim and you'll be able to control its start position and speed
◆ 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 | |
◆ _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: