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