Esempio n. 1
0
 /*
  *  Function: Updates the volume on every playing SubItems
  *  Parameter: new volume to set
  *  Return: None
  */
 public void UpdateVolume(float fVolume)
 {
     foreach (KeyValuePair <int, AudioObject> pair in playingAudioObjsMap)
     {
         pair.Value.SetVolume(volume * relatedCategory.GetVolume() * fVolume);
     }
 }
Esempio n. 2
0
    public override float GetCategoryVolume(string categoryId)
    {
        AudioCategory ac = GetCategory(categoryId);

        if (ac != null)
        {
            return(ac.GetVolume());
        }
        else
        {
            if (_isLogged)
            {
                Debug.LogFormat(this, "Audio Manager Failed to set volume to category[{0}].", categoryId);
            }
            return(0.0f);
        }
    }