Пример #1
0
        protected virtual void FixedUpdate()
        {
            if (Blocked)
            {
                if (Active)
                {
                    m_System.ExitAbility(this);
                }

                return;
            }

            if (Active)
            {
                if (m_System.enabled == false)
                {
                    m_System.ExitAbility(this);
                    return;
                }

                if (m_FinishOnAnimationEnd && m_AnimatorManager.HasFinishedAnimation(m_CurrentStatePlaying))
                {
                    m_System.ExitAbility(this);
                    return;
                }

                if (TryExitAbility())
                {
                    m_System.ExitAbility(this);
                }
            }
            else
            {
                if (ForceEnterAbility())
                {
                    m_System.OnTryEnterAbility(this);
                }
                else
                {
                    if (m_InputStateSet)
                    {
                        if (TryEnterAbility())
                        {
                            m_System.OnTryEnterAbility(this);
                        }
                    }
                }
            }

            m_InputStateSet = false;
        }