public static void TryInvoke(this UnityEventString evt, string value) { if (evt != null) { evt.Invoke(value); } }
public void AddListenerToAnnotateEndSensorBookmarkEvent(UnityAction <string> listener) { if (AnnotateEndSensorBookmarkEvent == null) { AnnotateEndSensorBookmarkEvent = new UnityEventString(); } AnnotateEndSensorBookmarkEvent.AddListener(listener); }
public static void TriggerEvent(string eventName, string param) { UnityEventString thisEvent = null; if (instance.eventParamDictionary.TryGetValue(eventName, out thisEvent)) { thisEvent.Invoke(param); } }
// Custom Unity Event validation public void OnValidate() { response = Event != null && Event.UnityEventType == typeof(UnityEvent) ? response : null; responseGameObject = Event != null && Event.UnityEventType == typeof(UnityEventGameObject) ? responseGameObject : null; responseTransform = Event != null && Event.UnityEventType == typeof(UnityEventTransform) ? responseTransform : null; responseInt = Event != null && Event.UnityEventType == typeof(UnityEventInt) ? responseInt : null; responseFloat = Event != null && Event.UnityEventType == typeof(UnityEventFloat) ? responseFloat : null; responseBool = Event != null && Event.UnityEventType == typeof(UnityEventBool) ? responseBool : null; responseString = Event != null && Event.UnityEventType == typeof(UnityEventString) ? responseString : null; }
public static void StopListening(string eventName, UnityAction <string> listener) { if (eventManager == null) { return; } UnityEventString thisEvent = null; if (instance.eventParamDictionary.TryGetValue(eventName, out thisEvent)) { thisEvent.RemoveListener(listener); } }
public static void StartListening(string eventName, UnityAction <string> listener) { UnityEventString thisEvent; if (instance.eventParamDictionary.TryGetValue(eventName, out thisEvent)) { thisEvent.AddListener(listener); } else { thisEvent = new UnityEventString(); thisEvent.AddListener(listener); instance.eventParamDictionary.Add(eventName, thisEvent); } }
public void SetOnLanguageChanged(UnityEventString value) { onLanguageChanged = value; }
public void SetOnTalk(UnityEventString value) { onTalk = value; }