From 9df67ea1d67092e5b2373ae4c5185368ae8ab726 Mon Sep 17 00:00:00 2001 From: lq <3298408835@qq.com> Date: Wed, 25 Dec 2024 17:24:22 +0800 Subject: [PATCH] =?UTF-8?q?roomId=E8=AE=BE=E4=B8=BA=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xiaofang/Assets/Script/DirllInterface/gameRoomReserve.cs | 5 ++++- xiaofang/Assets/Script/login/MyGlobal.cs | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/xiaofang/Assets/Script/DirllInterface/gameRoomReserve.cs b/xiaofang/Assets/Script/DirllInterface/gameRoomReserve.cs index e6ba1eb6..378d1eb0 100644 --- a/xiaofang/Assets/Script/DirllInterface/gameRoomReserve.cs +++ b/xiaofang/Assets/Script/DirllInterface/gameRoomReserve.cs @@ -31,7 +31,10 @@ public class gameRoomReserve : MonoBehaviour Debug.Log("预定演练" + response); // 解析服务器返回的数据 ScheduledDrillResponse scheduledDrillResponse = JsonConvert.DeserializeObject(response); - Debug.Log(scheduledDrillResponse.data); + //存静态 + GlobalData.scheduledDrillResponse = scheduledDrillResponse; + Debug.Log("这个不是是静态的" + scheduledDrillResponse.data); + Debug.Log("现在是静态的"+GlobalData.scheduledDrillResponse.data); return scheduledDrillResponse; } } diff --git a/xiaofang/Assets/Script/login/MyGlobal.cs b/xiaofang/Assets/Script/login/MyGlobal.cs index 582de315..7bcf7c03 100644 --- a/xiaofang/Assets/Script/login/MyGlobal.cs +++ b/xiaofang/Assets/Script/login/MyGlobal.cs @@ -6,6 +6,7 @@ public class MyGlobal : Global { public static MyGlobal global; public loginResponse loginResponse; + //public ScheduledDrillResponse scheduledDrillResponse; private void Start() { @@ -68,6 +69,7 @@ public static class GlobalData { // 静态变量用于存储登录响应数据 public static loginResponse ServerData; + public static ScheduledDrillResponse scheduledDrillResponse; } //==================================================== //public class TemplateListData: Response