Exemplo n.º 1
0
 private void OnCollisionEnter(Collision collision)
 {
     if (!this.enabled)
     {
         return;
     }
     if (filter.Match(collision.gameObject))
     {
         collisionEnter?.Invoke(collision);
     }
 }
Exemplo n.º 2
0
 private void OnTriggerEnter2D(Collider2D other)
 {
     if (!this.enabled)
     {
         return;
     }
     if (filter.Match(other.gameObject))
     {
         triggerEnter?.Invoke(other);
     }
 }
Exemplo n.º 3
0
        private void OnTriggerEnter2D(Collider2D other)
        {
//			Debug.Log("other.tag:" + other.tag);
//			Debug.Log("tagFilter.Contains(other.tag): " +tagFilter.Contains(other.tag));
            if (!this.enabled)
            {
                return;
            }
            if (filter.Match(other.gameObject) && (requirePositionInbound? (triggerZone.OverlapPoint(other.transform.position)) : true))
            {
                triggerEnter?.Invoke(other);
            }
        }