public static void TriggerBoolEvent(string eventName, bool input) { UnityBoolEvent thisEvent = null; if (instance.boolEventDictionary.TryGetValue(eventName, out thisEvent)) { thisEvent.Invoke(input); } }
public static void StopListeningTypeBool(string eventName, UnityAction <bool> listener) { if (eventManager == null) { return; } UnityBoolEvent thisEvent = null; if (instance.boolEventDictionary.TryGetValue(eventName, out thisEvent)) { thisEvent.RemoveListener(listener); } }
//--End Int Int Event methods-- //Bool based event setup (Ended up not using these for the time being) public static void StartListeningTypeBool(string eventName, UnityAction <bool> listener) { UnityBoolEvent thisEvent = null; if (instance.boolEventDictionary.TryGetValue(eventName, out thisEvent)) { thisEvent.AddListener(listener); } else { thisEvent = new UnityBoolEvent(); thisEvent.AddListener(listener); instance.boolEventDictionary.Add(eventName, thisEvent); } }