void IsColsedColipRun(Animator ani, AnimatorStateInfo stateInfo, int layerIndex, string boolName)
{
AnimationInfo[] infos = ani.GetCurrentAnimationClipState(layerIndex);
foreach (AnimationInfo info in infos)
{
if (stateInfo.IsName("Base Layer." + info.clip.name))
{
if (stateInfo.normalizedTime >= 1f)
{
ani.SetBool(info.clip.name, false);
ani.SetBool(boolName, true);
}
}
}
}
网友评论