This commit is contained in:
YangHua 2024-03-22 13:02:18 +08:00
parent 892259e6c7
commit ee2cc737af
1 changed files with 27 additions and 27 deletions

View File

@ -826,38 +826,38 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
/// <summary> /// <summary>
/// 雷达检测无人机身上得RSC /// 雷达检测无人机身上得RSC
/// </summary> /// </summary>
public void CheckRSC() //public void CheckRSC()
{ //{
if (string.IsNullOrEmpty(RCS)) // if (string.IsNullOrEmpty(RCS))
{ // {
float rcs = float.Parse(RCS); // float rcs = float.Parse(RCS);
if (rcs <= 0.5 && rcs >= 0.1) // if (rcs <= 0.5 && rcs >= 0.1)
{ // {
StartCoroutine(ShowRadarTips(0.8f, 2)); // StartCoroutine(ShowRadarTips(0.8f, 2));
} // }
else if (rcs >= 0.5f && rcs <= 1) // else if (rcs >= 0.5f && rcs <= 1)
{ // {
StartCoroutine(ShowRadarTips(0.4f, 1)); // StartCoroutine(ShowRadarTips(0.4f, 1));
} // }
} // }
} //}
/// <summary> /// <summary>
/// 多少时间在对方雷达界面上显示红色标记 /// 多少时间在对方雷达界面上显示红色标记
/// </summary> /// </summary>
/// <param name="minTime"></param> /// <param name="minTime"></param>
/// <param name="maxTime"></param> /// <param name="maxTime"></param>
/// <returns></returns> /// <returns></returns>
private IEnumerator ShowRadarTips(float minTime, float maxTime) //private IEnumerator ShowRadarTips(float minTime, float maxTime)
{ //{
GameObject tips = transform.Find("Minimapwrj").gameObject; // GameObject tips = transform.Find("Minimapwrj").gameObject;
while (true) // while (true)
{ // {
tips.gameObject.SetActive(false); // tips.gameObject.SetActive(false);
float time = UnityEngine.Random.Range(minTime, maxTime); // float time = UnityEngine.Random.Range(minTime, maxTime);
yield return new WaitForSeconds(time); // yield return new WaitForSeconds(time);
tips.gameObject.SetActive(true); // tips.gameObject.SetActive(true);
} // }
} //}
public LayerMask layerMask = new LayerMask(); public LayerMask layerMask = new LayerMask();
/// <summary> /// <summary>
@ -1230,7 +1230,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
unmannedAerialVehicleManages.RemoveAt(i); unmannedAerialVehicleManages.RemoveAt(i);
} }
} }
StopCoroutine(ShowRadarTips(0, 0)); //StopCoroutine(ShowRadarTips(0, 0));
OnActivationChanged -= OnActivationChangedHandler; OnActivationChanged -= OnActivationChangedHandler;
} }