//BGM Change public void ChangeBGM(eSoundArray _StopIndex, eSoundArray _StartIndex) { SoundInfo soundInfo_Stop = SoundArray [(int)_StopIndex].gameObject.GetComponent <SoundInfo> (); SoundInfo soundInfo_Start = SoundArray [(int)_StartIndex].gameObject.GetComponent <SoundInfo> (); //1이면 BGM _ 2이면 한번 소리 나는 사운드들 if (soundInfo_Stop.nType == 1) { AudioSource aSource = SoundArray [(int)_StopIndex].gameObject.GetComponent <AudioSource> (); aSource.Stop(); } if (soundInfo_Start.nType == 1) { AudioSource sSource = SoundArray [(int)_StartIndex].gameObject.GetComponent <AudioSource> (); if (_StartIndex == eSoundArray.BGM_BossBattle) { sSource.volume = 0.8f; } else { sSource.volume = 1.0f; } sSource.Play(); } }
//사운드 끔 public void StopSound(eSoundArray _index) { AudioSource aSource = SoundManager.instance.SoundArray [(int)_index].gameObject.GetComponent <AudioSource> (); if (_index == eSoundArray.BGM_BossBattle) { aSource.volume = 0.8f; } else { aSource.volume = 1.0f; } aSource.Stop(); }
//BGM Change public void ChangeBGM(eSoundArray _StopIndex, eSoundArray _StartIndex) { SoundInfo soundInfo_Stop = SoundArray [(int)_StopIndex].gameObject.GetComponent <SoundInfo> (); SoundInfo soundInfo_Start = SoundArray [(int)_StartIndex].gameObject.GetComponent <SoundInfo> (); //1이면 BGM _ 2이면 한번 소리 나는 사운드들 if (soundInfo_Stop.nType == 1) { AudioSource aSource = SoundArray [(int)_StopIndex].gameObject.GetComponent <AudioSource> (); aSource.Stop(); } if (soundInfo_Start.nType == 1) { AudioSource sSource = SoundArray [(int)_StartIndex].gameObject.GetComponent <AudioSource> (); sSource.Play(); } }
//사운드 끔 public void StopSound(eSoundArray _index) { AudioSource aSource = SoundManager.instance.SoundArray [(int)_index].gameObject.GetComponent <AudioSource> (); aSource.Stop(); }