Example #1
0
        private void RemoveOldEventInstanceIfKeyHasChanged()
        {
            if (!_soundEventInstance || _soundEventInstance.GetSoundEvent().key == key)
            {
                return;
            }

            _soundEventInstance.StopAndDestroy();

            _soundEventInstance = null;
        }
Example #2
0
        public void Unregister(SoundEventInstance soundEventInstance)
        {
            SoundEvent soundEvent = soundEventInstance.GetSoundEvent();

            _soundEventInstances[soundEvent.key].Remove(soundEventInstance);
        }