コード例 #1
0
ファイル: GameEvent.cs プロジェクト: grekomp/ArthanorUtils
    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);
        }
    }
コード例 #2
0
ファイル: GameEvent.cs プロジェクト: grekomp/ArthanorUtils
 public Delegate[] GetOnEventDataRaisedInvocationsList()
 {
     return(OnEventDataRaised?.GetInvocationList());
 }