Esempio n. 1
0
 private void OnTriggerExit(Collider other)
 {
     // Physics.IgnoreCollision(this.GetComponent<Collider>(), other, false);
     if (other.gameObject == parent)
     {
         parent = null;
     }
     else if (other.GetComponent <GlueBall>() == otherGlueBall)
     {
         otherGlueBall = null;
     }
 }
Esempio n. 2
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.GetComponent <Rigidbody>() != null)
     {
         if (parent == null)
         {
             parent = other.gameObject;
             pRB    = parent.GetComponent <Rigidbody>();
         }
         else if (otherGlueBall == null && other.gameObject.GetComponent <GlueBall>() != null)
         {
             otherGlueBall = other.gameObject.GetComponent <GlueBall>();
         }
     }
 }