This commit is contained in:
lilubing 2024-12-31 01:25:14 +08:00
parent a15a228e2c
commit 60a25efba0
3 changed files with 7 additions and 5 deletions

View File

@ -49,8 +49,8 @@ public class test : MonoBehaviour
byte[] sendData = ProtoBufffer.Serialize(msg); byte[] sendData = ProtoBufffer.Serialize(msg);
WSMessage deinfo = ProtoBufffer.DeSerialize<WSMessage>(sendData); WSMessage deinfo = ProtoBufffer.DeSerialize<WSMessage>(sendData);
LoginRequest login = ProtoBufffer.DeSerialize<LoginRequest>(deinfo.Data.ToByteArray()); LoginRequest login = ProtoBufffer.DeSerialize<LoginRequest>(deinfo.Data.ToByteArray());
Debug.Log("되쩌"); Debug.Log(login);
Debug.Log("dddddddddddddddddddd");
wEBScriptListener.SendMessageByte(sendData); wEBScriptListener.SendMessageByte(sendData);
} }
@ -579,9 +579,9 @@ public class test : MonoBehaviour
data.RoomId = roomId; data.RoomId = roomId;
Debug.Log("==========------------------ÓÃ");
WSMessage msg = new WSMessage(); WSMessage msg = new WSMessage();
msg.Module = "hall"; msg.Module = "move";
msg.ServiceName = "PlayerSituation"; msg.ServiceName = "PlayerSituation";
msg.Data = ByteString.CopyFrom(ProtoBufffer.Serialize(data)); msg.Data = ByteString.CopyFrom(ProtoBufffer.Serialize(data));
byte[] sendData = ProtoBufffer.Serialize(msg); byte[] sendData = ProtoBufffer.Serialize(msg);
@ -989,7 +989,7 @@ public class test : MonoBehaviour
break; break;
case "hall.PlayerSituation": case "move.PlayerSituation":
Debug.LogError("Íæ¼Ò״̬11111111111111111"); Debug.LogError("Íæ¼Ò״̬11111111111111111");
PlayerStatisticsResponse playerStatisticsResponse = ProtoBufffer.DeSerialize<PlayerStatisticsResponse>(bytes); PlayerStatisticsResponse playerStatisticsResponse = ProtoBufffer.DeSerialize<PlayerStatisticsResponse>(bytes);
foreach(var item in playerStatisticsResponse.Data) foreach(var item in playerStatisticsResponse.Data)

View File

@ -178,6 +178,7 @@ public class Starthost : MonoBehaviour
// button.onClick.AddListener(ShowPopupPanel); // button.onClick.AddListener(ShowPopupPanel);
//} //}
//Game.uiManager.ShowUI<Image>("Panel"); //Game.uiManager.ShowUI<Image>("Panel");
test.PlayerSituation(ReadRoom.instance.roomid);
Renyuan.SetActive(true); Renyuan.SetActive(true);
} }
// 显示弹出界面的方法 // 显示弹出界面的方法

View File

@ -59,6 +59,7 @@ public class LoginPanel : Base
// 将登录响应数据保存到静态变量中 // 将登录响应数据保存到静态变量中
GlobalData.ServerData = serverData; GlobalData.ServerData = serverData;
test.lodingWebSocket(id.text); test.lodingWebSocket(id.text);
// 打印 access_token // 打印 access_token
Debug.Log(serverData.data.access_token); Debug.Log(serverData.data.access_token);