Beispiel #1
0
 public void RaiseEvent(bool value)
 {
     if (OnEventRaised != null)
     {
         OnEventRaised.Invoke(value);
     }
 }
Beispiel #2
0
    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);
        }
    }
Beispiel #3
0
    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);
        }
    }
Beispiel #4
0
 public void RaiseEvent(T data)
 {
     value = data;
     OnEventRaised?.Invoke(data);
 }