예제 #1
0
 void OnTriggerEnter(Collider other)
 {
     if (TriggerCondictions(other))
     {
         if (attackObject != null)
         {
             attackObject.OnHit(this, other);
         }
     }
 }
예제 #2
0
 private void OnEnter(Collider other)
 {
     //Debug.Log("Enter" + other.gameObject.name);
     if (TriggerCondictions(other))
     {
         if (attackObject != null)
         {
             attackObject.OnHit(this, other);
             if (disableHitBoxOnHit && trigger.enabled)
             {
                 trigger.enabled = false;
             }
         }
     }
 }