添加 是否是palyer得逻辑
This commit is contained in:
parent
0fd0f87d8c
commit
6aba495fb9
|
@ -1 +1 @@
|
||||||
192.168.107.15:48888
|
127.0.0.1:48888
|
|
@ -1 +1 @@
|
||||||
192.168.107.15
|
127.0.0.1
|
|
@ -377,8 +377,14 @@ public class GameManager : MonoSingleton<GameManager>
|
||||||
if (device.GetComponent<UnmannedAerialVehicleManage>())
|
if (device.GetComponent<UnmannedAerialVehicleManage>())
|
||||||
device.GetComponent<UnmannedAerialVehicleManage>().wrjModel = (WRJModel)wrjModelCount;
|
device.GetComponent<UnmannedAerialVehicleManage>().wrjModel = (WRJModel)wrjModelCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
device.GetComponent<EquipmentCommon>().deviceID = data.id;
|
device.GetComponent<EquipmentCommon>().deviceID = data.id;
|
||||||
device.GetComponent<EquipmentCommon>().FillInTheData(data.list_para);
|
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)
|
private void OnGetRoomUsers(string obj)
|
||||||
|
|
|
@ -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}");
|
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>())
|
if (gameObject.GetComponent<UnmannedAerialVehicleManage>())
|
||||||
replaceInfoDic.Add("r2", ((int)gameObject.GetComponent<UnmannedAerialVehicleManage>().wrjModel).ToString());
|
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 =>
|
StartCoroutine(AsyncWebReq.PostData2(Url_AddDeviceAndGetDeviceId, replaceInfoDic, ResultsInfo =>
|
||||||
{
|
{
|
||||||
ReturnDeviceID returnID = JsonConvert.DeserializeObject<ReturnDeviceID>(ResultsInfo);
|
ReturnDeviceID returnID = JsonConvert.DeserializeObject<ReturnDeviceID>(ResultsInfo);
|
||||||
|
|
Loading…
Reference in New Issue