Example #1
0
 void OnTriggerEnter(Collider other)
 {
     if (other.tag == "cube")
     {
         AttachDirector.getInstance().attach(transform, other.gameObject.transform);
     }
 }
Example #2
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.tag == "detach")
     {
         Debug.Log("detach");
         if (AttachDirector.getInstance().detach(t1, t2))
         {
             Destroy(this.gameObject);
         }
     }
 }