Example #1
0
 public void OnClientLoginSuccess(NetworkConnection conn, MsgChatLoginSuccessFromServer msg)
 {
     if (!string.IsNullOrEmpty(msg.userId))
     {
         SetClientChatUser(msg.userId, msg.name);
     }
 }
Example #2
0
        public void OnClientLoginSuccess(NetworkMessage netMsg)
        {
            MsgChatLoginSuccessFromServer msg = netMsg.ReadMessage <MsgChatLoginSuccessFromServer>();

            if (!string.IsNullOrEmpty(msg.userId))
            {
                SetClientChatUser(msg.userId, msg.name);
            }
        }
Example #3
0
 public void AddChatUser(ChatUser user)
 {
     if (user != null && user.conn != null && !ChatUsers.ContainsKey(user.conn))
     {
         ChatUsers.Add(user.conn, user);
         MsgChatLoginSuccessFromServer msg = new MsgChatLoginSuccessFromServer();
         msg.userId = user.userId;
         msg.name   = user.name;
         user.conn.Send(MsgChatLoginSuccessFromServer.MsgId, msg);
     }
 }