Esempio n. 1
0
 private void ShowDamageTextAndAnimationAndPlaySound(AttackResult pAttackResult, Boolean pIsRange, Boolean pIsPoison, Boolean p_isMagical)
 {
     if (m_HUDDamageText != null)
     {
         GUIHUDText.PrintPortrait(m_HUDDamageText, pAttackResult, p_isMagical);
     }
     if (pAttackResult.Result == EResultType.BLOCK)
     {
         if (!pIsRange && !pIsPoison)
         {
             AudioController.Play("Blocked_Melee", FXHelper.GetCharacterGO(m_character.Index).transform);
         }
     }
     else if (pAttackResult.Result == EResultType.EVADE)
     {
         if (!pIsRange && !pIsPoison)
         {
             AudioController.Play("Miss_Attack", FXHelper.GetCharacterGO(m_character.Index).transform);
         }
     }
     else if (pIsPoison)
     {
         AudioController.Play("Poison_Damage", FXHelper.GetCharacterGO(m_character.Index).transform);
     }
     else if (pAttackResult.Result == EResultType.HIT && pAttackResult.DamageDone > 0)
     {
         AudioController.Play("Hit_Melee", FXHelper.GetCharacterGO(m_character.Index).transform);
     }
     else if (pAttackResult.Result == EResultType.CRITICAL_HIT)
     {
         AudioController.Play("Hit_Melee", FXHelper.GetCharacterGO(m_character.Index).transform);
     }
 }
Esempio n. 2
0
 private void OnReceivedAttacks(AttacksUnityEventArgs e)
 {
     if (m_HUDDamageText == null)
     {
         return;
     }
     GUIHUDText.Print(m_HUDDamageText, e.Result, e.IsMagical);
 }
Esempio n. 3
0
        private void OnBuffPerform(Object sender, EventArgs e)
        {
            if (m_HUDDamageText == null || MyController != sender)
            {
                return;
            }
            BuffPerformedEventArgs buffPerformedEventArgs = (BuffPerformedEventArgs)e;

            GUIHUDText.Print(m_HUDDamageText, buffPerformedEventArgs.Result, true);
        }