C# 是否有返回动画当前帧的函数?

C# 是否有返回动画当前帧的函数?,c#,animation,unity3d,C#,Animation,Unity3d,我想能够冻结我的动画在一个特定的帧,如果球员是拍摄迅速。大概是这样的: if (timeBetweenShots < 0.3f && timeBetweenShots > 0.0f && animator.GetCurrentFrame() == 20) { animator.enabled = false; } if(timeBetweenShots0.0f&&animator.GetCurrentFrame()==20) { a

我想能够冻结我的动画在一个特定的帧,如果球员是拍摄迅速。大概是这样的:

if (timeBetweenShots < 0.3f && timeBetweenShots > 0.0f && animator.GetCurrentFrame() == 20) 
{
        animator.enabled = false;
}
if(timeBetweenShots<0.3f&&timeBetweenShots>0.0f&&animator.GetCurrentFrame()==20)
{
animator.enabled=false;
}

我看到有一个animator.GetCurrentAnimationClipState()但是这看起来不像我需要的,除非我弄错了

也许我不认为这就是动画师的工作方式。考虑创建一个动画状态“冻结”(只有1帧,如果你想要的话),然后触发它当你需要的时候。