Ejemplo n.º 1
0
    public void SetSoundParameter(SoundParameterHandle handle, float value, GameObject obj)
    {
        switch (handle)
        {
        case SoundParameterHandle.Distance:
            AkSoundEngine.SetRTPCValue("distanceToCharacter", value, obj); break;

        case SoundParameterHandle.MasterVolume:
            AkSoundEngine.SetRTPCValue("masterVolume", value, obj); break;

        case SoundParameterHandle.MusicVolume:
            AkSoundEngine.SetRTPCValue("musicVolume", value, obj); break;

        case SoundParameterHandle.SoundVolume:
            Debug.Log(string.Format("Sound Volume set to: {0} (But doesn't work!)", value)); break;

        default:
            throw new System.Exception("Enum variant doesn't exist, update SetSoundParameter method (AudioManager.cs)");
        }
    }
Ejemplo n.º 2
0
 public void SetSoundParameter(SoundParameterHandle handle, float value)
 {
     SetSoundParameter(handle, value, gameObject);
 }
Ejemplo n.º 3
0
 public static void SetSoundParameter(SoundParameterHandle handle, float value)
 {
     audioManager.SetSoundParameter(handle, value);
 }
Ejemplo n.º 4
0
 public static void SetSoundParameter(SoundParameterHandle handle, float value, GameObject obj)
 {
     audioManager.SetSoundParameter(handle, value, obj);
 }