Esempio n. 1
0
 private void PlaySFX(HVRSocketable socketable)
 {
     if (AudioGrabbedOverride)
     {
         SFXPlayer.Instance.PlaySFX(AudioGrabbedOverride, transform.position);
     }
     else if (socketable.SocketedClip)
     {
         SFXPlayer.Instance.PlaySFX(socketable.SocketedClip, transform.position);
     }
     else if (AudioGrabbedFallback)
     {
         SFXPlayer.Instance.PlaySFX(AudioGrabbedFallback, transform.position);
     }
 }
Esempio n. 2
0
        public override bool IsValid(HVRSocketable socketable)
        {
            if (string.IsNullOrWhiteSpace(SocketType))
            {
                return(false);
            }
            if (!socketable)
            {
                return(false);
            }
            var stringFilter = socketable as HVRStringSocketable;

            if (stringFilter == null)
            {
                return(false);
            }
            if (string.IsNullOrWhiteSpace(stringFilter.SocketType))
            {
                return(false);
            }
            return(SocketType.ToLowerInvariant().Equals(stringFilter.SocketType.ToLowerInvariant()));
        }