示例#1
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.gameObject.layer == 10 && other.transform.parent != transform.parent)
     {
         hitboxInfo = other.GetComponent <HitboxInformation>();
         knockback  = hitboxInfo.CalculateKnockback(player.percentage, player.weight, thisCollider);
         hitstun    = hitboxInfo.calculateHitstun(player.percentage);
         player.GotHit(knockback, hitstun, hitboxInfo.getDamage());
     }
 }