📜  unity 检查动画器参数触发器是否被激活 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:58.684000             🧑  作者: Mango

代码示例1
bool isPlaying(Animator anim, string stateName)
{
    if (anim.GetCurrentAnimatorStateInfo(animLayer).IsName(stateName) &&
            anim.GetCurrentAnimatorStateInfo(animLayer).normalizedTime < 1.0f)
        return true;
    else
        return false;
}