HeavenStudioPlus/Assets/Scripts/Util/AnimationHelpers.cs
2022-03-14 07:21:05 -07:00

13 lines
No EOL
373 B
C#

using UnityEngine;
namespace HeavenStudio.Util
{
public static class AnimationHelpers
{
public static bool IsAnimationNotPlaying(this Animator anim)
{
float compare = anim.GetCurrentAnimatorStateInfo(0).speed;
return anim.GetCurrentAnimatorStateInfo(0).normalizedTime >= compare && !anim.IsInTransition(0);
}
}
}