Roll random
float random = Random.Range(0, 1f);
if(random > 0.5f){
}
else{
}
roll 0 Dao 1
Greater than 0.5 to a first number of pick up your
Less than 0.5 second to take your number
Test Ok
animator unity code control component inside the animation speed
Animator class public: {MonoBehaviour
Animator Anim;
AnimatorStateInfo animatorInfo;
void the Start () {
Anim = GetComponent <Animator> ();
}
void the Update () {
animatorInfo = anim.GetCurrentAnimatorStateInfo (0);
IF (animatorInfo.IsName ( " the Take 001 ")) // Note here refers not to the name, but the name of the movie animation states
{
anim.speed = 2;
}
}
Test