Beispiel #1
0
 public void PlayFx(AudioName aName)
 {
     if (isSoundOn)
     {
         sfxSource.PlayOneShot(audioDict [aName.ToString()]);
     }
 }
Beispiel #2
0
 public void PlayFx(AudioName aName, float delay)
 {
     if (isSoundOn)
     {
         sfxSource.clip = audioDict [aName.ToString()];
         sfxSource.PlayDelayed(delay);
     }
 }
Beispiel #3
0
        public void PlaySound(AudioName name, float volume)
        {
            if (audioClips[(int)name])
            {
                AudioSource source = GetSoucre();

                source.pitch  = 1.0f;
                source.volume = volume;
                source.PlayOneShot(audioClips[(int)name]);
            }
            else
            {
                print("AudioManager : AudioClip[" + name.ToString() + "] is not setted");
            }
        }
Beispiel #4
0
 public void PlayFx(AudioName aName, float delay)
 {
     if (isSoundOn) {
         sfxSource.clip = audioDict [aName.ToString ()];
         sfxSource.PlayDelayed (delay);
     }
 }
Beispiel #5
0
 public void PlayFx(AudioName aName)
 {
     if (isSoundOn) {
         sfxSource.PlayOneShot (audioDict [aName.ToString ()]);
     }
 }
Beispiel #6
0
 private void Play(AudioName name, float volume = 1)
 {
     Play(name.ToString(), volume);
 }