Ejemplo n.º 1
0
        /// <summary>
        /// The ability has stopped running.
        /// </summary>
        protected virtual void AbilityStopped()
        {
            // Equip the item again if it was equipped when the ability started.
            if (m_EquipItem)
            {
                EventHandler.ExecuteEvent(m_GameObject, "OnAbilityToggleEquippedItem");
                EventHandler.UnregisterEvent(m_GameObject, "OnAnimatorItemUnequipped", AbilityStarted);
                m_EquipItem = false;
            }

            if (m_MoveToTargetRoutine != null)
            {
                StopCoroutine(m_MoveToTargetRoutine);
            }
            m_Active = false;
            m_Controller.AbilityStopped();
            if (HasAnimatorControl())
            {
                m_AnimatorMonitor.DetermineStates();
            }
        }