public void RaiseEvent(bool value) { if (OnEventRaised != null) { OnEventRaised.Invoke(value); } }
public void Raise() { if (debug) { Debug.Log(string.Format("GameEvent Raised ({0}), no data passed.", name), this); } try { OnEventRaised?.Invoke(); } catch (Exception e) { Debug.LogException(e); } }
public void Raise(object caller, object data = null) { if (debug) { Debug.Log(string.Format("GameEvent Raised ({0}), caller: {1}, data: {2}", name, caller, data), this); } try { OnEventRaised?.Invoke(); OnEventDataRaised?.Invoke(new GameEventData(this, data, caller)); } catch (Exception e) { Debug.LogException(e); } }
public void RaiseEvent(T data) { value = data; OnEventRaised?.Invoke(data); }