public static void TriggerEvent(string eventName, Hashtable eventParams = default(Hashtable)) { SDKBoyEvent thisEvent = null; if (instance.eventDictionary.TryGetValue(eventName, out thisEvent)) { thisEvent.Invoke(eventParams); } }
public static void StopListening(string eventName, UnityAction <Hashtable> listener) { if (eventManager == null) { return; } SDKBoyEvent thisEvent = null; if (instance.eventDictionary.TryGetValue(eventName, out thisEvent)) { thisEvent.RemoveListener(listener); } }
public static void StartListening(string eventName, UnityAction <Hashtable> listener) { SDKBoyEvent thisEvent = null; if (instance.eventDictionary.TryGetValue(eventName, out thisEvent)) { thisEvent.AddListener(listener); } else { thisEvent = new SDKBoyEvent(); thisEvent.AddListener(listener); instance.eventDictionary.Add(eventName, thisEvent); } }