Beispiel #1
0
        private bool ConcernedWith(AudibleAspect aspect)
        {
            if (aspect == null)
            {
                return(false);
            }
            if (!aspect.isActiveAndEnabled)
            {
                return(false);
            }
            if (_aspectLayerMask != -1 && !aspect.gameObject.IntersectsLayerMask(_aspectLayerMask))
            {
                return(false);
            }
            if (!_aspectTagMask.Intersects(aspect))
            {
                return(false);
            }
            if (!_canDetectSelf && aspect.entityRoot == this.entityRoot)
            {
                return(false);
            }

            return(true);
        }
 public SirenToken(AudibleAspect aspect)
 {
     if (object.ReferenceEquals(aspect, null))
     {
         throw new System.ArgumentNullException("aspect");
     }
     _aspect = aspect;
 }