void OnTriggerExit(Collider other) { if (enabled) { if (contents.Contains(other.gameObject)) { contents.Remove(other.gameObject); triggerExited.Invoke(other.gameObject); } } ; }
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."); } }
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); } }
private void OnTriggerExit(Collider collider) { TriggerExited?.Invoke(collider); }
private void OnTriggerExit(Collider other) => OnTriggerExited?.Invoke(other);
private void OnTriggerEnter2D(Collider2D collision) { TriggerExited?.Invoke(collision); }