public void BroadcastPollResults(Event chosenEvent) { Debug.Log("Results of the poll: " + Events.EventList[(Events.EventID)chosenEvent.id] + " was voted"); StartCoroutine(LaunchEventAfterDelay(chosenEvent)); _AudioSource.clip = eventHorn; _AudioSource?.Play(); }
private IEnumerator LaunchEventAfterDelay(Event chosenEvent) { Pulse.Pulsate(); yield return(new WaitForSeconds(3.0f)); var key = (Events.EventID)chosenEvent.id; if (_EventSubscribers.ContainsKey(key)) { _EventSubscribers[key] .ForEach((subscriber) => { subscriber.ActivateEventMode(); }); } else { Debug.LogError("Event key not found"); } }