2022-01-21 07:09:32 +00:00
|
|
|
using UnityEngine;
|
|
|
|
|
2022-03-14 14:21:05 +00:00
|
|
|
namespace HeavenStudio.Util
|
2022-01-21 07:09:32 +00:00
|
|
|
{
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|