public static void TriggerEventGo(string eventName, GameObject value) { UnityEventGo thisEvent = null; if (instance.eventDictionaryGo.TryGetValue(eventName, out thisEvent)) { thisEvent.Invoke(value); } }
public static void StopListeningGo(string eventName, UnityAction <GameObject> listener) { if (eventManager == null) { return; } UnityEventGo thisEvent = null; if (instance.eventDictionaryGo.TryGetValue(eventName, out thisEvent)) { thisEvent.RemoveListener(listener); } }
public static void StartListeningGo(string eventName, UnityAction <GameObject> listener) { UnityEventGo thisEvent = null; if (instance.eventDictionaryGo.TryGetValue(eventName, out thisEvent)) { thisEvent.AddListener(listener); } else { thisEvent = new UnityEventGo(); thisEvent.AddListener(listener); instance.eventDictionaryGo.Add(eventName, thisEvent); } }