/// <summary>removes callback event from callback events dictionary</summary> public void RemoveListener(MatchmakingCallbackEvent callbackEvent, Action <string> callback) { if (matchmakingCallbackEvents.ContainsKey(callbackEvent)) { matchmakingCallbackEvents[callbackEvent] -= callback; } }
/// <summary>Adds callback event to callback events dictionary</summary> public void AddListener(MatchmakingCallbackEvent callbackEvent, Action <string> callback) { if (matchmakingCallbackEvents.ContainsKey(callbackEvent)) { matchmakingCallbackEvents[callbackEvent] += callback; } else { matchmakingCallbackEvents.Add(callbackEvent, null); matchmakingCallbackEvents[callbackEvent] += callback; } }
/// <summary>Adds single callback event to singlecallback events dictionary</summary> public void AddSingleCallback(MatchmakingCallbackEvent callbackEvent, Action callback) { if (singleMatchmakingCallbackEvents.ContainsKey(callbackEvent)) { singleMatchmakingCallbackEvents[callbackEvent] += callback; } else { singleMatchmakingCallbackEvents.Add(callbackEvent, null); singleMatchmakingCallbackEvents[callbackEvent] += callback; } }
/// <summary>Removes callback listener for matchmaking events</summary> public static void RemoveCallbackListener(MatchmakingCallbackEvent callbackEvent, Action <string> callback) { callbackHandler.RemoveListener(callbackEvent, callback); }