Example #1
0
        public static void MakeWorldSound(IAudible Source, List <Collider> ignoreColliders, MasterAudio.SoundType SoundType)
        {
            //use master audio to create a sound
            //attach an audible bubble to the source
            AudibleBubble audibleBubble = null;
            AudioSource   sourceAudio   = null;

            if (MasterAudio.PlaySound(SoundType, Source.transform, Source.AudibleVolume, ref sourceAudio))
            {
                Source.LastSoundType = SoundType;
                audibleBubble        = sourceAudio.gameObject.GetOrAdd <AudibleBubble> ();
                audibleBubble.StartUsing(Source, ignoreColliders, 0.25f);
            }
        }
Example #2
0
        public static void MakeWorldSound(IAudible source, MasterAudio.SoundType soundType, string soundName)
        {
            //use master audio to create a sound
            //attach an audible bubble to the source
            AudibleBubble audibleBubble = null;
            AudioSource   sourceAudio   = null;

            if (MasterAudio.PlaySound(soundType, source.transform, source.AudibleVolume, ref sourceAudio, soundName))
            {
                source.LastSoundType = soundType;
                source.LastSoundName = soundName;
                audibleBubble        = sourceAudio.gameObject.GetOrAdd <AudibleBubble> ();
                audibleBubble.StartUsing(source, null, 0.25f);
            }
        }