예제 #1
0
        public AFSound Add(AFSound sound)
        {
            if (Exists(sound.GetName()))
            {
                AFDebug.LogWarning("Audio already registered: " + name);
                return(m_audios[sound.GetName()]);
            }

            return(Put(sound));
        }
예제 #2
0
        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);
        }
예제 #3
0
        internal AFSound Put(AFSound sound)
        {
            m_audios[sound.GetName()] = sound;
            OnAudioAdd.Dispatch(sound);
            audiosInList++;

            sound.gameObject.transform.SetParent(this.gameObject.transform);

            return(sound);
        }
예제 #4
0
 public void Add(AFSound sound)
 {
     m_audios[sound.GetName()] = sound;
 }
예제 #5
0
 public void Remove(AFSound audio)
 {
     audio.Destroy();
     m_audios.Remove(audio.GetName());
     audiosInList--;
 }