Пример #1
0
        /// <summary>
        /// The character took some damage at the specified position. Apply the animation in direction of the damage.
        /// </summary>
        /// <param name="amount">The total amount of damage inflicted on the character.</param>
        /// <param name="position">The position that the character took the damage.</param>
        /// <param name="force">The amount of force applied to the object while taking the damage.</param>
        /// <param name="attacker">The GameObject that did the damage.</param>
        private void TookDamage(int amount, Vector3 position, Vector3 force, AllyMember _instigator, GameObject hitGameObject)
        {
            if (amount >= largeDamageAmount)
            {
                m_DamageType = RTSDamageType.DamageReactGut;
            }

            StartAbility();
            Invoke("DamageVisualizationComplete", damageTime);
        }
Пример #2
0
 /// <summary>
 /// Callback when the animation is complete. Stop the ability.
 /// </summary>
 private void DamageVisualizationComplete()
 {
     ToggleDamageIsLeft();
     m_DamageType = damageIsLeft ? RTSDamageType.DamageReactLeft : RTSDamageType.DamageReactRight;
     StopAbility();
 }