예제 #1
0
 void OnTriggerEnter(Collider collid)
 {
     if (collid.gameObject.CompareTag("Leaf") && !bossBehavior.GetIsKnocked())
     {
         float damage;
         if (collid.gameObject.GetComponent <MoveLeaf>() != null)
         {
             damage = collid.gameObject.GetComponent <MoveLeaf>().GetDamage();
         }
         else
         {
             damage = collid.gameObject.GetComponent <MeleeAttackTrigger>().GetDamage();
         }
         bossBehavior.BeingHit();
         bossBehavior.LooseHp(damage);
     }
 }
예제 #2
0
 void OnTriggerEnter(Collider collid)
 {
     if (collid.gameObject.CompareTag("Leaf") && !bossBehavior.GetIsKnocked())
     {
         float damage;
         if (collid.gameObject.GetComponent <MoveLeaf>() != null)
         {
             damage = collid.gameObject.GetComponent <MoveLeaf>().GetDamage();
         }
         else
         {
             damage = collid.gameObject.GetComponent <MeleeAttackTrigger>().GetDamage();
         }
         //================================================
         SoundController.instance.SelectYOKAI("Hurt");
         //================================================
         bossBehavior.BeingHit();
         bossBehavior.LooseHp(damage);
     }
 }