public AFSound Add(AFSound sound) { if (Exists(sound.GetName())) { AFDebug.LogWarning("Audio already registered: " + name); return(m_audios[sound.GetName()]); } return(Put(sound)); }
internal AFSound Put(AFSound sound) { if (Exists(sound.GetName())) { AFDebug.LogWarning("Audio already registered: " + sound.GetName()); return(m_audios[sound.GetName()]); } m_audios[sound.GetName()] = sound; OnAudioAdd.Dispatch(sound); audiosInList++; sound.gameObject.transform.SetParent(this.gameObject.transform); return(sound); }
internal AFSound Put(AFSound sound) { m_audios[sound.GetName()] = sound; OnAudioAdd.Dispatch(sound); audiosInList++; sound.gameObject.transform.SetParent(this.gameObject.transform); return(sound); }
public void Add(AFSound sound) { m_audios[sound.GetName()] = sound; }
public void Remove(AFSound audio) { audio.Destroy(); m_audios.Remove(audio.GetName()); audiosInList--; }