public static void StartListening(GlobalEvents eventName, UnityAction <Transform> listener) { TransformEvent thisEvent = null; if (transformEventDictionary.TryGetValue(eventName, out thisEvent)) { thisEvent.AddListener(listener); } else { thisEvent = new TransformEvent(); thisEvent.AddListener(listener); transformEventDictionary.Add(eventName, thisEvent); } }
public static void StartListening(string eventName, UnityAction <Transform> listener) { UnityEvent <Transform> thisEvent = null; if (instance.eventDictionaryTransform.TryGetValue(eventName, out thisEvent)) { thisEvent.AddListener(listener); } else { thisEvent = new TransformEvent(); thisEvent.AddListener(listener); instance.eventDictionaryTransform.Add(eventName, thisEvent); } }
public static void StartListening(TransformEventName eventName, UnityAction <Transform> listener) { UnityEvent <Transform> thisEvent = null; if (Instance.m_eventWithTransformDictionary.TryGetValue(eventName, out thisEvent)) { thisEvent.AddListener(listener); } else { thisEvent = new TransformEvent(); thisEvent.AddListener(listener); Instance.m_eventWithTransformDictionary.Add(eventName, thisEvent); } }