예제 #1
0
        public MyListBoxItem CopyUnityPlayerOnClientToMyListBoxItem(UnityPlayerOnClient one)
        {
            MyListBoxItem item = new MyListBoxItem()
            {
                UIName_Id = one.Socket.RemoteEndPoint.ToString(),
                ShowMsg   = "UserIP:" + one.Socket.RemoteEndPoint.ToString() + " -Token:" + one.Token,
                UserName  = one.UserName,
                Ip        = one.Socket.RemoteEndPoint.ToString()
            };

            return(item);
        }
예제 #2
0
        private void OnWeaveServerReceiveOnLineUnityPlayerMessageEvent(byte command, string data, UnityPlayerOnClient gamer)
        {
            // 登陆用户发送过来的数据

            SetServerReceiveText("Unity玩家登陆事件--触发了一次(OnWeaveServerReceiveOnLineUnityPlayerMessageEvent)" + Environment.NewLine);

            WeaveSession ws = Newtonsoft.Json.JsonConvert.DeserializeObject <WeaveSession>(data);

            SetServerReceiveText("收到【" + gamer.UserName + "】发来的数据:  " + ws.Root + Environment.NewLine);
        }
예제 #3
0
 private void OnWeaveServerGetUnityPlayerOffLineEvent(UnityPlayerOnClient gamer)
 {
     SetServerReceiveText("Unity玩家下线事件--触发了一次(OnWeaveServerGetUnityPlayerOffLineEvent)" + Environment.NewLine);
 }
예제 #4
0
 private void OnWeaveServerGetUnityPlayerOnLineEvent(UnityPlayerOnClient gamer)
 {
     //当有用户 账号密码登陆成功的时候
     AddListBoxItemAction(loginedUserList, CopyUnityPlayerOnClientToMyListBoxItem(gamer));
     SetServerReceiveText("Unity登陆后的玩家--触发了一次(OnWeaveServerUpdateUnityPlayerSetOnLineEvent)" + Environment.NewLine);
 }