Ejemplo n.º 1
0
        public static bool CanPlaySizzle(GameObject go)
        {
            bool result = false;

            if (go != null)
            {
                ParticipationController component = go.GetComponent <ParticipationController>();
                if (component == null || !component.IsInteracting())
                {
                    RunController component2 = go.GetComponent <RunController>();
                    if (component2 != null && component2.enabled)
                    {
                        Animator component3 = go.GetComponent <Animator>();
                        if (component3 != null)
                        {
                            AnimatorStateInfo currentAnimatorStateInfo = component3.GetCurrentAnimatorStateInfo(AnimationHashes.Layers.Base);
                            result = IsIdling(currentAnimatorStateInfo) || currentAnimatorStateInfo.IsTag("Sizzling");
                        }
                    }
                }
            }
            return(result);
        }