Beispiel #1
0
 public void RegisterCallback(Client.MessageType type, Action <INetworkService, Client.BaseMessage> callback)
 {
     if (OnMessage.ContainsKey(type))
     {
         OnMessage[type] += callback;
     }
 }
Beispiel #2
0
        public void UnregisterCallback(Client.MessageType type, Action <INetworkService, Client.BaseMessage> callback)
        {
            if (!OnMessage.ContainsKey(type))
            {
                return;
            }

            OnMessage[type] -= callback;
        }