Ejemplo n.º 1
0
 void OnTriggerExit(Collider other)
 {
     if (enabled)
     {
         if (contents.Contains(other.gameObject))
         {
             contents.Remove(other.gameObject);
             triggerExited.Invoke(other.gameObject);
         }
     }
     ;
 }
Ejemplo n.º 2
0
 private void OnCollisionPairRemoved(EntityCollidable sender, BroadPhaseEntry other)
 {
     if (other.Tag is Collider)
     {
         Collider otherCollider = (Collider)other.Tag;
         TriggerExited?.Invoke(otherCollider);
     }
     else
     {
         Console.WriteLine("ERROR: TAG WAS NOT COLLIDER.");
     }
 }
Ejemplo n.º 3
0
        private void HandleExit(GameObject other)
        {
            if (!other.CompareTag(tagFilter))
            {
                return;
            }

            events.OnTriggerExit?.Invoke();
            TriggerExited?.Invoke(other.gameObject);
            _count--;
            if (_count == 0)
            {
                events.OnAllExit?.Invoke();
                AllExited?.Invoke(other.gameObject);
            }
        }
Ejemplo n.º 4
0
 private void OnTriggerExit(Collider collider)
 {
     TriggerExited?.Invoke(collider);
 }
Ejemplo n.º 5
0
 private void OnTriggerExit(Collider other) => OnTriggerExited?.Invoke(other);
Ejemplo n.º 6
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     TriggerExited?.Invoke(collision);
 }