Example #1
0
        private void HandleEnter(GameObject other)
        {
            if (!other.CompareTag(tagFilter))
            {
                return;
            }

            events.OnTriggerEnter?.Invoke();
            TriggerEntered?.Invoke(other.gameObject);
            _count++;
        }
Example #2
0
 private void OnCollisionPairCreated(EntityCollidable sender, BroadPhaseEntry other, NarrowPhasePair pair)
 {
     if (!(other.Tag is Collider))
     {
         Console.WriteLine("ERROR: TAG WAS NOT COLLIDER.");
     }
     else
     {
         Collider otherCollider = (Collider)other.Tag;
         TriggerEntered?.Invoke(otherCollider);
     }
 }
 private void OnTriggerEnter(Collider other)
 {
     TriggerEntered?.Invoke(other);
 }
Example #4
0
 private void OnTriggerExit2D(Collider2D collision)
 {
     TriggerEntered?.Invoke(collision);
 }