public void EnqueueSound(TriggerSoundArgs sound) { _soundQueue.Enqueue(sound); if (!IsRunning) { Reset(); Start(); } }
//TODO: Ideally this would be an internal method that could only be called by the trigger logic. public static void OnTriggerActivated(TriggerSoundArgs sound) { TriggerActivated?.Invoke(null, sound); }
internal void triggerWorkerPool_TriggerActivated(object sender, TriggerSoundArgs soundArgs) { EnqueueSound(soundArgs); }