Beispiel #1
0
        /// <summary>
        /// The GameObject has been destroyed.
        /// </summary>
        protected override void OnDestroy()
        {
            base.OnDestroy();

            m_UseAnimatorAudioStateSet.OnDestroy();
            EventHandler.UnregisterEvent <ILookSource>(m_Character, "OnCharacterAttachLookSource", OnAttachLookSource);
            if (m_UseAttribute != null)
            {
                EventHandler.UnregisterEvent(m_UseAttribute, "OnAttributeReachedDestinationValue", UseDepleted);
            }
        }
Beispiel #2
0
        /// <summary>
        /// The GameObject has been destroyed.
        /// </summary>
        protected override void OnDestroy()
        {
            base.OnDestroy();

            m_ImpactAnimatorAudioStateSet.OnDestroy();
            EventHandler.UnregisterEvent <bool, bool>(m_Character, "OnBlockAbilityStart", OnAim);
            if (m_DurabilityAttribute != null)
            {
                EventHandler.UnregisterEvent(m_DurabilityAttribute, "OnAttributeReachedDestinationValue", DurabilityDepleted);
            }
            EventHandler.UnregisterEvent <bool, bool>(m_Character, "OnAimAbilityStart", OnAim);
        }