private bool ConcernedWith(VisualAspect vaspect) { if (vaspect == null) { return(false); } if (!vaspect.isActiveAndEnabled) { return(false); } if (_aspectLayerMask != -1 && !_aspectLayerMask.Intersects(vaspect.gameObject)) { return(false); } if (!_aspectTagMask.Intersects(vaspect)) { return(false); } if (!_canDetectSelf && vaspect.entityRoot == this.entityRoot) { return(false); } return(true); }
private bool ConcernedWith(Collider coll) { if (coll == null) { return(false); } var mode = (coll.isTrigger) ? AllowedColliderMode.Trigger : AllowedColliderMode.Solid; if ((_allowedColliders & mode) == 0) { return(false); } if (_aspectLayerMask != -1 && !coll.gameObject.IntersectsLayerMask(_aspectLayerMask)) { return(false); } if (!_aspectTagMask.Intersects(coll)) { return(false); } if (!_canDetectSelf) { var root = coll.FindRoot(); if (root == this.entityRoot) { return(false); } } return(true); }
public bool Ignores(IAspect aspect) { if (aspect == null) { return(true); } if (_aspectLayerMask != -1 && !aspect.gameObject.IntersectsLayerMask(_aspectLayerMask)) { return(true); } if (!_aspectTagMask.Intersects(aspect.gameObject)) { return(true); } return(false); }