예제 #1
0
 private void StopListeningTo(TreeCollider other)
 {
     other.onTriggerEnter.RemoveListener(OnTriggerEnter);
     other.onTriggerStay.RemoveListener(OnTriggerStay);
     other.onTriggerExit.RemoveListener(OnTriggerExit);
     other.onCollisionEnter.RemoveListener(OnCollisionEnter);
     other.onCollisionStay.RemoveListener(OnCollisionStay);
     other.onCollisionExit.RemoveListener(OnCollisionExit);
 }
예제 #2
0
 private void StartListeningTo(TreeCollider other)
 {
     other.onTriggerEnter.AddListener(OnTriggerEnter);
     other.onTriggerStay.AddListener(OnTriggerStay);
     other.onTriggerExit.AddListener(OnTriggerExit);
     other.onCollisionEnter.AddListener(OnCollisionEnter);
     other.onCollisionStay.AddListener(OnCollisionStay);
     other.onCollisionExit.AddListener(OnCollisionExit);
 }