This commit is contained in:
parent
79b6304635
commit
d911387140
|
@ -133,6 +133,7 @@ public class EquipmentCommon : MonoBehaviour
|
||||||
replaceInfoDic.Add("device_name", equipmentCommon.equipmentType);
|
replaceInfoDic.Add("device_name", equipmentCommon.equipmentType);
|
||||||
replaceInfoDic.Add("para_list", paraListJson);
|
replaceInfoDic.Add("para_list", paraListJson);
|
||||||
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>())
|
||||||
replaceInfoDic.Add("r2", ((int)gameObject.GetComponent<UnmannedAerialVehicleManage>().wrjModel).ToString());
|
replaceInfoDic.Add("r2", ((int)gameObject.GetComponent<UnmannedAerialVehicleManage>().wrjModel).ToString());
|
||||||
StartCoroutine(AsyncWebReq.PostData2(Url_AddDeviceAndGetDeviceId, replaceInfoDic, ResultsInfo =>
|
StartCoroutine(AsyncWebReq.PostData2(Url_AddDeviceAndGetDeviceId, replaceInfoDic, ResultsInfo =>
|
||||||
{
|
{
|
||||||
|
|
|
@ -145,6 +145,7 @@ public class LaserFireControlPlatformManger : MonoBehaviour
|
||||||
/// 激光火炮打击时间
|
/// 激光火炮打击时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static float lasertime;
|
public static float lasertime;
|
||||||
|
public float lasertimes;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 判断物体是否在相机里面
|
/// 判断物体是否在相机里面
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -187,6 +188,10 @@ public class LaserFireControlPlatformManger : MonoBehaviour
|
||||||
|
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
|
if (lasertime>0)
|
||||||
|
{
|
||||||
|
lasertime -= Time.deltaTime;
|
||||||
|
}
|
||||||
//if (UIBootstrap.Instance.GetRoleByIDPracticeId(GlobalFlag.practiceSeatId) != "0"&&Input.GetMouseButtonDown(0))
|
//if (UIBootstrap.Instance.GetRoleByIDPracticeId(GlobalFlag.practiceSeatId) != "0"&&Input.GetMouseButtonDown(0))
|
||||||
//{
|
//{
|
||||||
// if (!EventSystem.current.IsPointerOverGameObject())
|
// if (!EventSystem.current.IsPointerOverGameObject())
|
||||||
|
@ -195,6 +200,7 @@ public class LaserFireControlPlatformManger : MonoBehaviour
|
||||||
// Front = true;
|
// Front = true;
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
if (UIBootstrap.Instance.GetRoleByIDPracticeId(GlobalFlag.practiceSeatId) != "0" && Input.GetMouseButtonDown(0))
|
if (UIBootstrap.Instance.GetRoleByIDPracticeId(GlobalFlag.practiceSeatId) != "0" && Input.GetMouseButtonDown(0))
|
||||||
{
|
{
|
||||||
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
|
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
|
||||||
|
@ -298,6 +304,7 @@ public class LaserFireControlPlatformManger : MonoBehaviour
|
||||||
case "储能间隔时间:":
|
case "储能间隔时间:":
|
||||||
StorageIntervalTime = weaponitemone[i].para_value;
|
StorageIntervalTime = weaponitemone[i].para_value;
|
||||||
lasertime = float.Parse(StorageIntervalTime);
|
lasertime = float.Parse(StorageIntervalTime);
|
||||||
|
lasertimes = float.Parse(StorageIntervalTime);
|
||||||
break;
|
break;
|
||||||
case "毁伤目标累积作用时间:":
|
case "毁伤目标累积作用时间:":
|
||||||
CumulativeActionTimeOfDamageTarget = weaponitemone[i].para_value;
|
CumulativeActionTimeOfDamageTarget = weaponitemone[i].para_value;
|
||||||
|
@ -549,6 +556,10 @@ public class LaserFireControlPlatformManger : MonoBehaviour
|
||||||
OuterLaserlineRenderer.SetPosition(0, LaserPoint.transform.position); // 设置线段起点为物体位置
|
OuterLaserlineRenderer.SetPosition(0, LaserPoint.transform.position); // 设置线段起点为物体位置
|
||||||
OuterLaserlineRenderer.SetPosition(1, LaserPoint.transform.position); // 设置线段终点为目标点
|
OuterLaserlineRenderer.SetPosition(1, LaserPoint.transform.position); // 设置线段终点为目标点
|
||||||
}
|
}
|
||||||
|
if (lasertimes!=0)
|
||||||
|
{
|
||||||
|
lasertime = lasertimes;
|
||||||
|
}
|
||||||
isLasing = false;
|
isLasing = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -121,7 +121,7 @@ public class RadarManger : MonoBehaviour
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 计时火炮蓄能时间
|
/// 计时火炮蓄能时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public float radartime;
|
public float radartime=0;
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
Mincamera = GameObject.Find("Minimap Camera").GetComponent<Camera>();
|
Mincamera = GameObject.Find("Minimap Camera").GetComponent<Camera>();
|
||||||
|
@ -305,12 +305,10 @@ public class RadarManger : MonoBehaviour
|
||||||
UnmannedAerialVehicle unmannedAerialVehicle = colliders2[i].GetComponent<UnmannedAerialVehicle>();
|
UnmannedAerialVehicle unmannedAerialVehicle = colliders2[i].GetComponent<UnmannedAerialVehicle>();
|
||||||
if (unmannedAerialVehicle)
|
if (unmannedAerialVehicle)
|
||||||
{
|
{
|
||||||
radartime += Time.deltaTime;
|
if (radartime == LaserFireControlPlatformManger.lasertime)
|
||||||
if (radartime>=LaserFireControlPlatformManger.lasertime)
|
|
||||||
{
|
{
|
||||||
Debug.Log("今来了");
|
Debug.Log("今来了");
|
||||||
LaserFireControlPlatformManger laserFireControlPlatformManger = LaserFireControlPlatformManger.laserFireControlPlatformMangers.Find(x => (x != null && x.isLasing == false));
|
LaserFireControlPlatformManger laserFireControlPlatformManger = LaserFireControlPlatformManger.laserFireControlPlatformMangers.Find(x => (x != null && x.isLasing == false));
|
||||||
radartime = 0;
|
|
||||||
if (laserFireControlPlatformManger)
|
if (laserFireControlPlatformManger)
|
||||||
{
|
{
|
||||||
laserFireControlPlatformManger.isLasing = true;
|
laserFireControlPlatformManger.isLasing = true;
|
||||||
|
@ -318,6 +316,7 @@ public class RadarManger : MonoBehaviour
|
||||||
laserFireControlPlatformManger.targetPoint = unmannedAerialVehicle.transform;
|
laserFireControlPlatformManger.targetPoint = unmannedAerialVehicle.transform;
|
||||||
laserFireControlPlatformManger.Crosshair();
|
laserFireControlPlatformManger.Crosshair();
|
||||||
laserFireControlPlatformManger.Lasing();
|
laserFireControlPlatformManger.Lasing();
|
||||||
|
radartime = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
number++;
|
number++;
|
||||||
|
|
|
@ -449,13 +449,13 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
///根据风得速度改变无人机得速度
|
/////根据风得速度改变无人机得速度
|
||||||
FireSpeed = float.Parse(maximumFlyingSpeed) / int.Parse(currentSceneInfo.EnvWindSpeed);
|
//FireSpeed = float.Parse(maximumFlyingSpeed) / int.Parse(currentSceneInfo.EnvWindSpeed);
|
||||||
///如果风速大于6级,无人机停止飞行
|
/////如果风速大于6级,无人机停止飞行
|
||||||
if (int.Parse(currentSceneInfo.EnvWindSpeed) > 6)
|
//if (int.Parse(currentSceneInfo.EnvWindSpeed) > 6)
|
||||||
{
|
//{
|
||||||
FireSpeed = 0;
|
// FireSpeed = 0;
|
||||||
}
|
//}
|
||||||
CheckRSC();
|
CheckRSC();
|
||||||
if (i == (weaponitemone.Count - 1))
|
if (i == (weaponitemone.Count - 1))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue