旧的动画方式下,可以这么写
if (!animation.IsPlaying("stand"))
animation.Play("stand");
}
新的
AnimatorStateInfo asi=animator.GetCurrentAnimatorStateInfo(0);//0 is Default Layer
if(asi.IsName("stand"))
{
///dosomething();
}
转载于:https://www.cnblogs.com/feiyanstudio/articles/7339675.html