Beispiel #1
0
 private void Start()
 {
     if (!string.IsNullOrWhiteSpace(MusicName))
     {
         MusicTransition.Play(MusicName);
     }
 }
Beispiel #2
0
        public void Play()
        {
            if (!string.IsNullOrWhiteSpace(MusicName))
            {
                MusicTransition.Play(MusicName);
            }

            if (AudioSource != null && AudioSource.clip != null)
            {
                MusicTransition.Play(AudioSource, VolumeMultiplier);
            }
        }
Beispiel #3
0
        private void Start()
        {
            if (!string.IsNullOrWhiteSpace(MusicName))
            {
                MusicTransition.Play(MusicName, VolumeMultiplier, Restart);
            }

            if (AudioSource != null && AudioSource.clip != null)
            {
                MusicTransition.Play(AudioSource, VolumeMultiplier, Restart);
            }

            var lowPassFilter = FindObjectOfType <AudioLowPassFilter>();

            if (lowPassFilter != null)
            {
                FindObjectOfType <AudioLowPassFilter>().enabled = HasLowPassFilter;
            }
        }