Beispiel #1
0
 private void DelayPlaySE()
 {
     if (m_footSound == true)
     {
         AttachSESource.PlayOneShot(m_seDic[m_nextSEName] as AudioClip);
     }
 }
Beispiel #2
0
 private void DelayPlaySE()
 {
     if (AttachSESource.isPlaying == false || overRapSE == true)
     {
         //float temporaryShelterOfVolume = AttachSESource.volume;
         //AttachSESource.volume = temporaryShelterOfVolume;//ボリュームを戻す
         AttachSESource.volume = PlayerPrefs.GetFloat("SE_VOLUME_KEY", 0.8f);
         AttachSESource.volume = AttachSESource.volume * _seDic[_nextSEName].volume;            //個別に設定されたボリュームを反映
         AttachSESource.PlayOneShot(_seDic[_nextSEName].audioClip);
     }
 }
        //=================================================================================
        //SE
        //=================================================================================
        /// <summary>
        /// 指定したファイル名のSEを流す。第二引数のdelayに指定した時間だけ再生までの間隔を空ける
        /// </summary>
        public void PlaySE(string seName)
        {
            if (!_seDic.ContainsKey(seName))
            {
                Debug.Log(seName + "という名前のSEがありません");
                return;
            }

            _nextSEName = seName;
            AttachSESource.PlayOneShot(_seDic[_nextSEName]);
            //Debug.Log("Play[" + seName + "]");
        }
Beispiel #4
0
    public void TryAudio(string seName, float volume)
    {
        if (!seDic.ContainsKey(seName))
        {
            Debug.Log(seName + "という名前のSEがありません");
            return;
        }

        if (!AttachSESource.isPlaying)
        {
            AttachSESource.PlayOneShot(seDic [seName] as AudioClip, volume);
            return;
        }
    }
Beispiel #5
0
 void DelayPlaySE()
 {
     AttachSESource.PlayOneShot(seList.FirstOrDefault(s => s.AudioType == _nextSEName).AudioClip);
 }
 public void StopSE()
 {
     AttachSESource.Stop();
 }
Beispiel #7
0
 private void DelayPlaySE()
 {
     AttachSESource.PlayOneShot(_seDic [_nextSEName] as AudioClip);
 }