示例#1
0
 void OnTriggerExit2D(Collider2D other)
 {
     if (other.gameObject.CompareTag(Tags.OBJECT))
     {
         inCollision = null;
     }
     else if (other.gameObject.CompareTag(Tags.AREA_RELEASE))
     {
         releaseArea = null;
     }
 }
示例#2
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.gameObject.CompareTag(Tags.OBJECT))
     {
         inCollision = other.gameObject.GetComponent <InteractableObject>();
     }
     if (other.gameObject.CompareTag(Tags.AREA_RELEASE))
     {
         releaseArea = other.gameObject.GetComponent <ReleaseArea>();
     }
     if (other.gameObject.CompareTag(Tags.ROOM))
     {
         whichRoom = other.gameObject;
     }
 }