예제 #1
0
 void OnTriggerExit(Collider other)
 {
     if (enabled)
     {
         if (contents.Contains(other.gameObject))
         {
             contents.Remove(other.gameObject);
             triggerExited.Invoke(other.gameObject);
         }
     }
     ;
 }
예제 #2
0
파일: Collider.cs 프로젝트: zhuowp/ge
 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.");
     }
 }
예제 #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);
            }
        }
예제 #4
0
 private void OnTriggerExit(Collider collider)
 {
     TriggerExited?.Invoke(collider);
 }
예제 #5
0
 private void OnTriggerExit(Collider other) => OnTriggerExited?.Invoke(other);
예제 #6
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     TriggerExited?.Invoke(collision);
 }