void OnCollisionExit2D(ParadoxNotion.EventData <Collision2D> data)
 {
     if (!specifiedTagOnly || data.value.gameObject.CompareTag(objectTag))
     {
         stay = false;
         if (checkType == CollisionTypes.CollisionExit)
         {
             saveGameObjectAs.value = data.value.gameObject;
             YieldReturn(true);
         }
     }
 }
Exemple #2
0
 public void OnTriggerExit2D(ParadoxNotion.EventData <Collider2D> data)
 {
     if (!specifiedTagOnly || data.value.gameObject.CompareTag(objectTag))
     {
         stay = false;
         if (CheckType == TriggerTypes.TriggerExit)
         {
             saveGameObjectAs.value = data.value.gameObject;
             YieldReturn(true);
         }
     }
 }
 public void OnTriggerEnter(ParadoxNotion.EventData <Collider> data)
 {
     if (!specifiedTagOnly || data.value.gameObject.CompareTag(objectTag))
     {
         stay = true;
         if (checkType == TriggerTypes.TriggerEnter || checkType == TriggerTypes.TriggerStay)
         {
             saveGameObjectAs.value = data.value.gameObject;
             YieldReturn(true);
         }
     }
 }
 void OnCollisionEnter2D(ParadoxNotion.EventData <Collision2D> data)
 {
     if (!specifiedTagOnly || data.value.gameObject.CompareTag(objectTag))
     {
         stay = true;
         if (checkType == CollisionTypes.CollisionEnter || checkType == CollisionTypes.CollisionStay)
         {
             saveGameObjectAs.value  = data.value.gameObject;
             saveContactPoint.value  = data.value.contacts[0].point;
             saveContactNormal.value = data.value.contacts[0].normal;
             YieldReturn(true);
         }
     }
 }