Browse Source

景点触发参数修改

DGJ 1 year ago
parent
commit
51617150fa
2 changed files with 12 additions and 4 deletions
  1. 3 3
      Assets/Scripts/Net/HttpSocket.cs
  2. 9 1
      Assets/Scripts/UI/GameManager.cs

+ 3 - 3
Assets/Scripts/Net/HttpSocket.cs

@@ -96,7 +96,7 @@ public class HttpSocket : MonoSingleton<HttpSocket>
     ///  进入触发区域后向后台发送信息
     /// </summary>
     /// <param name="pointId"></param>
-    public void SendIpToPointTrigger(string pointId, string name, Action<string> CallBack)
+    public void SendIpToPointTrigger(string pointId, int id, Action<string> CallBack)
     {
         SendNetConnectPointTrigger sendNet = new SendNetConnectPointTrigger();
 
@@ -104,7 +104,7 @@ public class HttpSocket : MonoSingleton<HttpSocket>
         //sendNet.sn = API_GSXR_Slam.SlamManager.plugin.SN;
 
         sendNet.projectId = DataManager.Instance.ProjectID;
-        sendNet.name = name;
+        sendNet.id = id;
         string jsonData = JsonMapper.ToJson(sendNet);
 
         Debug.Log(jsonData);
@@ -167,7 +167,7 @@ public class SendNetConnectPointTrigger
 {
     public int projectId { get; set; }
     public string sn { get; set; }
-    public string name { get; set; }
+    public int id { get; set; }
 }
 
 public class SendSnInfo

+ 9 - 1
Assets/Scripts/UI/GameManager.cs

@@ -1589,7 +1589,15 @@ public class GameManager : MonoSingleton<GameManager>
                     ListLocalShowObjs[i].gameObject.SetActive(true);
                 // 进入景点通知后台
 
-             //   HttpSocket.Instance.SendIpToPointTrigger(" ",other.name, CallBack);
+
+                for (int j = 0; j < SceneValue.listSpoit.Count; j++)
+                {
+                    if(SceneValue.listSpoit[i].name == other.name)
+                    {
+
+                        HttpSocket.Instance.SendIpToPointTrigger(" ", SceneValue.listSpoit[i].id, CallBack);
+                    }
+                }
 
                 if (SpoitIndex == i)
                 {