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