public void PlayBGM(string bgmName, bool stopImmediate)
 {
     int playDelay = 0;
     if(stopImmediate)
     {
         m_BGMs[(int)m_focus].Stop();
     }
     else
     {
         AudioTo(m_BGMs[(int)m_focus], 0);
         playDelay = 1;
     }
     if (m_BGMs[(int)m_reverse].clip == null || m_BGMs[(int)m_reverse].clip.name.CompareTo(bgmName) != 0)
     {
         AudioClip clip = Resources.Load("audio/" + bgmName) as AudioClip;
         m_BGMs[(int)m_reverse].clip = clip;
     }
     m_BGMs[(int)m_reverse].Play((ulong)playDelay);
     if (ConstantData.Sound)
     {
         AudioTo(m_BGMs[(int)m_reverse], 1);
     }
     m_focus = m_reverse;
 }
 public BGMPlayer(GameObject o)
 {
     m_BGMs = new AudioSource[2];
     for (int i = 0; i < 2; i++)
     {
         m_BGMs[i] = SupportTools.AddChild<AudioSource>(o);
         m_BGMs[i].name = "BGM_" + (i + 1);
         m_BGMs[i].loop = true;
         m_BGMs[i].playOnAwake = false;
         m_BGMs[i].volume = !ConstantData.Sound ? 0 : 1;
         m_BGMs[i].pitch = 1;
     }
     m_focus = BGMFocus.Second;
     m_BGMs[1].volume = 0;
 }