diff --git a/xiaofang/Assets/ProtoBuf/test.cs b/xiaofang/Assets/ProtoBuf/test.cs index 9bd1ac21..82b62a56 100644 --- a/xiaofang/Assets/ProtoBuf/test.cs +++ b/xiaofang/Assets/ProtoBuf/test.cs @@ -49,8 +49,8 @@ public class test : MonoBehaviour byte[] sendData = ProtoBufffer.Serialize(msg); WSMessage deinfo = ProtoBufffer.DeSerialize(sendData); LoginRequest login = ProtoBufffer.DeSerialize(deinfo.Data.ToByteArray()); - Debug.Log("登录"); - + Debug.Log(login); + Debug.Log("dddddddddddddddddddd"); wEBScriptListener.SendMessageByte(sendData); } @@ -579,9 +579,9 @@ public class test : MonoBehaviour data.RoomId = roomId; - + Debug.Log("==========------------------用"); WSMessage msg = new WSMessage(); - msg.Module = "hall"; + msg.Module = "move"; msg.ServiceName = "PlayerSituation"; msg.Data = ByteString.CopyFrom(ProtoBufffer.Serialize(data)); byte[] sendData = ProtoBufffer.Serialize(msg); @@ -989,7 +989,7 @@ public class test : MonoBehaviour break; - case "hall.PlayerSituation": + case "move.PlayerSituation": Debug.LogError("玩家状态11111111111111111"); PlayerStatisticsResponse playerStatisticsResponse = ProtoBufffer.DeSerialize(bytes); foreach(var item in playerStatisticsResponse.Data) diff --git a/xiaofang/Assets/Res/gsj/scripts/Starthost.cs b/xiaofang/Assets/Res/gsj/scripts/Starthost.cs index f3b27522..e4e4cd4c 100644 --- a/xiaofang/Assets/Res/gsj/scripts/Starthost.cs +++ b/xiaofang/Assets/Res/gsj/scripts/Starthost.cs @@ -178,6 +178,7 @@ public class Starthost : MonoBehaviour // button.onClick.AddListener(ShowPopupPanel); //} //Game.uiManager.ShowUI("Panel"); + test.PlayerSituation(ReadRoom.instance.roomid); Renyuan.SetActive(true); } // 显示弹出界面的方法 diff --git a/xiaofang/Assets/Script/loginScripts/LoginPanel.cs b/xiaofang/Assets/Script/loginScripts/LoginPanel.cs index f71d2839..14399eb6 100644 --- a/xiaofang/Assets/Script/loginScripts/LoginPanel.cs +++ b/xiaofang/Assets/Script/loginScripts/LoginPanel.cs @@ -59,6 +59,7 @@ public class LoginPanel : Base // 将登录响应数据保存到静态变量中 GlobalData.ServerData = serverData; + test.lodingWebSocket(id.text); // 打印 access_token Debug.Log(serverData.data.access_token);