예제 #1
0
 protected void RpcTakeDamage(int damageTaken, int blocked)
 {
     if (damageTaken > 0)
     {
         PlayAnimation(BattleAnimation.Hurt);
     }
     Health -= damageTaken;
     damagePopup.DisplayDamage(damageTaken, blocked);
     if (damageTaken > 0)
     {
         if (Health > 0)
         {
             audioSource.TryPlay(hurtClip);
         }
         else
         {
             audioSource.TryPlay(dieClip);
         }
     }
 }