Пример #1
0
    private IEnumerator PlayOtherSoundCoroutine(OtherSoundType type)
    {
        audioOther.Stop();
        switch (type)
        {
        case OtherSoundType.Talk:
        {
            audioOther.clip   = talk;
            audioOther.loop   = false;
            audioOther.volume = 1f;
            audioOther.Play();
            break;
        }

        case OtherSoundType.Wave:
        {
            audioOther.clip   = wave;
            audioOther.loop   = true;
            audioOther.volume = 1f;
            audioOther.Play();
            break;
        }

        case OtherSoundType.Point:
        {
            audioOther.clip   = pointing;
            audioOther.loop   = true;
            audioOther.volume = 1f;
            audioOther.Play();
            break;
        }

        default: break;
        }
        yield return(null);
    }
Пример #2
0
 private IEnumerator PlayOtherSoundCoroutine(OtherSoundType type)
 {
     audioOther.Stop();
     switch (type)
     {
         case OtherSoundType.Talk:
             {
                 audioOther.clip = talk;
                 audioOther.loop = false;
                 audioOther.volume = 1f;
                 audioOther.Play();
                 break;
             }
         case OtherSoundType.Wave:
             {
                 audioOther.clip = wave;
                 audioOther.loop = true;
                 audioOther.volume = 1f;
                 audioOther.Play();
                 break;
             }
         case OtherSoundType.Point:
             {
                 audioOther.clip = pointing;
                 audioOther.loop = true;
                 audioOther.volume = 1f;
                 audioOther.Play();
                 break;
             }
         default:break;
     }
     yield return null;
 }
Пример #3
0
 public void PlayOtherSound(OtherSoundType type)
 {
     StartCoroutine(PlayOtherSoundCoroutine(type));
 }
Пример #4
0
 public void PlayOtherSound(OtherSoundType type)
 {
     StartCoroutine(PlayOtherSoundCoroutine(type));
 }