Пример #1
0
 public void SetMusic()
 {
     if (IsPlaySound)
     {
         EazySoundManager.GlobalSoundsVolume   = 1;
         EazySoundManager.GlobalUISoundsVolume = 1;
         EazySoundManager.PlayMusic(BGM, 1, true, false, 1, 1);
     }
     else
     {
         EazySoundManager.GlobalSoundsVolume   = 0;
         EazySoundManager.GlobalUISoundsVolume = 0;
         EazySoundManager.StopAll(1);
     }
 }
Пример #2
0
 public void SetMusic()
 {
     if (IsPlaySound)
     {
         EazySoundManager.GlobalSoundsVolume   = 1;
         EazySoundManager.GlobalUISoundsVolume = 1;
         m_Audio.Play();
     }
     else
     {
         EazySoundManager.GlobalSoundsVolume   = 0;
         EazySoundManager.GlobalUISoundsVolume = 0;
         EazySoundManager.StopAll(1);
     }
 }
Пример #3
0
        public void SetMusic(bool isPlay, AudioClip musicClip)
        {
            if (isPlay)
            {
                EazySoundManager.GlobalSoundsVolume   = 1;
                EazySoundManager.GlobalUISoundsVolume = 1;
                EazySoundManager.PlayMusic(musicClip, 1, true, false, 1, 1);
            }
            else
            {
                EazySoundManager.GlobalSoundsVolume   = 0;
                EazySoundManager.GlobalUISoundsVolume = 0;
                EazySoundManager.StopAll(1);
            }

            Global.Instance.IsPlaySound = isPlay;
        }
    private void OnClickAudioBtn(bool isPlay)
    {
        if (isPlay)
        {
            EazySoundManager.GlobalSoundsVolume   = 1;
            EazySoundManager.GlobalUISoundsVolume = 1;
            EazySoundManager.PlayMusic(m_Musics[0], 1, true, false, 1, 1);
        }
        else
        {
            EazySoundManager.GlobalSoundsVolume   = 0;
            EazySoundManager.GlobalUISoundsVolume = 0;
            EazySoundManager.StopAll(1);
        }

        GlobalInit.Instance.IsPlaySound = isPlay;
    }
Пример #5
0
 public void SetMusic()
 {
     if (IsPlaySound)
     {
         if (m_BGAudio == null)
         {
             int id = EazySoundManager.PlayMusic(BGClip);
             m_BGAudio = EazySoundManager.GetAudio(id);
         }
         EazySoundManager.GlobalSoundsVolume   = 1;
         EazySoundManager.GlobalUISoundsVolume = 1;
         m_BGAudio.Play();
     }
     else
     {
         EazySoundManager.GlobalSoundsVolume   = 0;
         EazySoundManager.GlobalUISoundsVolume = 0;
         EazySoundManager.StopAll(1);
     }
 }