public virtual bool Allow(Collider2D inObject) { if (!Collider.Allow(inObject)) { return(false); } if (CustomCollider2DFilter != null && !CustomCollider2DFilter.Allow(inObject)) { return(false); } GameObject go; if (Collider.UseRigidbody && inObject.attachedRigidbody) { go = inObject.attachedRigidbody.gameObject; } else { go = inObject.gameObject; } return(Allow(go)); }
public virtual bool Allow(GameObject inObject) { if (!LayerMask.Allow(inObject)) { return(false); } if (!Tags.Allow(inObject)) { return(false); } if (!Name.Allow(inObject)) { return(false); } if (CustomGOFilter != null && !CustomGOFilter.Allow(inObject)) { return(false); } if (CustomFunc != null && !CustomFunc.Invoke(inObject)) { return(false); } Component component; if (!Component.Filter(inObject, out component)) { return(false); } if (!component.IsReferenceNull()) { if (ComponentFunc != null && !ComponentFunc.Invoke(component)) { return(false); } } return(true); }