From 6aba495fb9d0eac87538aefd3eb93d7d91a3f9a8 Mon Sep 17 00:00:00 2001 From: YangHua <1475658476@qq.com> Date: Fri, 19 Jan 2024 11:24:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E6=98=AFpalyer=E5=BE=97=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/StreamingAssets/IPPort.txt | 2 +- Assets/StreamingAssets/confing.txt | 2 +- Assets/Zion/Scripts/Adam/GameManager.cs | 6 ++++++ Assets/Zion/Scripts/ModelFunction/EquipmentCommon.cs | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Assets/StreamingAssets/IPPort.txt b/Assets/StreamingAssets/IPPort.txt index d9f6429d..298829e4 100644 --- a/Assets/StreamingAssets/IPPort.txt +++ b/Assets/StreamingAssets/IPPort.txt @@ -1 +1 @@ -192.168.107.15:48888 \ No newline at end of file +127.0.0.1:48888 \ No newline at end of file diff --git a/Assets/StreamingAssets/confing.txt b/Assets/StreamingAssets/confing.txt index 8708cdba..e56ea71e 100644 --- a/Assets/StreamingAssets/confing.txt +++ b/Assets/StreamingAssets/confing.txt @@ -1 +1 @@ -192.168.107.15 \ No newline at end of file +127.0.0.1 \ No newline at end of file diff --git a/Assets/Zion/Scripts/Adam/GameManager.cs b/Assets/Zion/Scripts/Adam/GameManager.cs index 0bee989e..3c9e413a 100644 --- a/Assets/Zion/Scripts/Adam/GameManager.cs +++ b/Assets/Zion/Scripts/Adam/GameManager.cs @@ -377,8 +377,14 @@ public class GameManager : MonoSingleton if (device.GetComponent()) device.GetComponent().wrjModel = (WRJModel)wrjModelCount; } + device.GetComponent().deviceID = data.id; device.GetComponent().FillInTheData(data.list_para); + Debug.Log($"{data.r3 == GlobalFlag.currentUser.user_id}"); + if (data.r3 == GlobalFlag.currentUser.user_id) + { + device.GetComponent().isPlayer = true; + } } private void OnGetRoomUsers(string obj) diff --git a/Assets/Zion/Scripts/ModelFunction/EquipmentCommon.cs b/Assets/Zion/Scripts/ModelFunction/EquipmentCommon.cs index 5a302787..1bc5869b 100644 --- a/Assets/Zion/Scripts/ModelFunction/EquipmentCommon.cs +++ b/Assets/Zion/Scripts/ModelFunction/EquipmentCommon.cs @@ -135,7 +135,7 @@ public class EquipmentCommon : MonoBehaviour replaceInfoDic.Add("r1", $"{transform.position.x},{transform.position.y},{transform.position.z},{transform.eulerAngles.x},{transform.eulerAngles.y},{transform.eulerAngles.z}"); if (gameObject.GetComponent()) replaceInfoDic.Add("r2", ((int)gameObject.GetComponent().wrjModel).ToString()); - //replaceInfoDic.Add("r3",); + replaceInfoDic.Add("r3", GlobalFlag.currentUser.user_id); StartCoroutine(AsyncWebReq.PostData2(Url_AddDeviceAndGetDeviceId, replaceInfoDic, ResultsInfo => { ReturnDeviceID returnID = JsonConvert.DeserializeObject(ResultsInfo);