添加 是否是palyer得逻辑

This commit is contained in:
YangHua 2024-01-19 11:24:52 +08:00
parent 0fd0f87d8c
commit 6aba495fb9
4 changed files with 9 additions and 3 deletions

View File

@ -1 +1 @@
192.168.107.15:48888
127.0.0.1:48888

View File

@ -1 +1 @@
192.168.107.15
127.0.0.1

View File

@ -377,8 +377,14 @@ public class GameManager : MonoSingleton<GameManager>
if (device.GetComponent<UnmannedAerialVehicleManage>())
device.GetComponent<UnmannedAerialVehicleManage>().wrjModel = (WRJModel)wrjModelCount;
}
device.GetComponent<EquipmentCommon>().deviceID = data.id;
device.GetComponent<EquipmentCommon>().FillInTheData(data.list_para);
Debug.Log($"<color=yellow>{data.r3 == GlobalFlag.currentUser.user_id}</color>");
if (data.r3 == GlobalFlag.currentUser.user_id)
{
device.GetComponent<EquipmentCommon>().isPlayer = true;
}
}
private void OnGetRoomUsers(string obj)

View File

@ -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<UnmannedAerialVehicleManage>())
replaceInfoDic.Add("r2", ((int)gameObject.GetComponent<UnmannedAerialVehicleManage>().wrjModel).ToString());
//replaceInfoDic.Add("r3",);
replaceInfoDic.Add("r3", GlobalFlag.currentUser.user_id);
StartCoroutine(AsyncWebReq.PostData2(Url_AddDeviceAndGetDeviceId, replaceInfoDic, ResultsInfo =>
{
ReturnDeviceID returnID = JsonConvert.DeserializeObject<ReturnDeviceID>(ResultsInfo);