Compare commits

..

No commits in common. "6d89f365d37b5c0003b5e23e7ae923a0462acb7b" and "27b17a8f6ed9932186786a48365ff2cb38842acd" have entirely different histories.

3 changed files with 9 additions and 22 deletions

View File

@ -833,8 +833,6 @@ MonoBehaviour:
toggle5: {fileID: 5382943705491709219}
toggle6: {fileID: 6251437642903478223}
toggle7: {fileID: 117463751223528660}
Frequency:
camera: {fileID: 480111845}
--- !u!65 &1537869982341012852
BoxCollider:
m_ObjectHideFlags: 0

View File

@ -81,10 +81,7 @@ public class Spectrumdetection : MonoBehaviour
/// 最终的波段
/// </summary>
public string Frequency;
/// <summary>
/// 摄像机显示层数
/// </summary>
public Camera camera;
void Start()
{
equipmentCommon = GetComponent<EquipmentCommon>();
@ -105,7 +102,6 @@ public class Spectrumdetection : MonoBehaviour
if (ison)
{
Frequency = "HUF";
camera.cullingMask = 1 << 16;
}
});
toggle2.onValueChanged.AddListener((ison) =>
@ -113,7 +109,6 @@ public class Spectrumdetection : MonoBehaviour
if (ison)
{
Frequency = "L";
camera.cullingMask = 1 << 17;
}
});
toggle3.onValueChanged.AddListener((ison) =>
@ -121,7 +116,6 @@ public class Spectrumdetection : MonoBehaviour
if (ison)
{
Frequency = "S";
camera.cullingMask = 1 << 18;
}
});
toggle4.onValueChanged.AddListener((ison) =>
@ -129,7 +123,6 @@ public class Spectrumdetection : MonoBehaviour
if (ison)
{
Frequency = "C";
camera.cullingMask = 1 << 19;
}
});
toggle5.onValueChanged.AddListener((ison) =>
@ -137,7 +130,6 @@ public class Spectrumdetection : MonoBehaviour
if (ison)
{
Frequency = "X";
camera.cullingMask = 1 << 20;
}
});
toggle6.onValueChanged.AddListener((ison) =>
@ -145,7 +137,6 @@ public class Spectrumdetection : MonoBehaviour
if (ison)
{
Frequency = "Ku";
camera.cullingMask = 1 << 21;
}
});
toggle7.onValueChanged.AddListener((ison) =>
@ -153,7 +144,6 @@ public class Spectrumdetection : MonoBehaviour
if (ison)
{
Frequency = "Ka";
camera.cullingMask = (1 << 22);
}
});
}
@ -245,7 +235,7 @@ public class Spectrumdetection : MonoBehaviour
private void Microwavefrequency()
{
if (frequency.Length > 0)
if (frequency.Length>0)
{
string[] str = frequency.Split(',');
for (int i = 0; i < str.Length; i++)
@ -257,7 +247,7 @@ public class Spectrumdetection : MonoBehaviour
break;
case "L":
toggle2.gameObject.SetActive(true);
break;
break ;
case "S":
toggle3.gameObject.SetActive(true);
break;
@ -291,7 +281,7 @@ public class Spectrumdetection : MonoBehaviour
/// <exception cref="NotImplementedException"></exception>
private void Emittedray()
{
if (Input.GetMouseButtonDown(0) && UIBootstrap.Instance.GetRoleByIDPracticeId(GlobalFlag.practiceSeatId) != "0")
if (Input.GetMouseButtonDown(0)&& UIBootstrap.Instance.GetRoleByIDPracticeId(GlobalFlag.practiceSeatId) != "0")
{
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
RaycastHit hit;
@ -299,7 +289,7 @@ public class Spectrumdetection : MonoBehaviour
{
return;
}
if (Physics.Raycast(ray, out hit, 1000))
if (Physics.Raycast(ray,out hit,1000))
{
if (hit.collider.GetComponent<EquipmentCommon>())
{
@ -322,25 +312,25 @@ public class Spectrumdetection : MonoBehaviour
Collider[] colliders = Physics.OverlapSphere(transform.position, float.Parse(Detectionrange) * 100);
for (int i = 0; i < colliders.Length; i++)
{
if (colliders[i].transform.gameObject.tag == "WRJ")
if (colliders[i].transform.gameObject.tag=="WRJ")
{
Debug.LogError("进来了");
UnmannedAerialVehicle unmannedAerialVehicle = null;
if (colliders[i].GetComponent<UnmannedAerialVehicle>())
{
unmannedAerialVehicle = colliders[i].GetComponent<UnmannedAerialVehicle>();
if (unmannedAerialVehicle != null)
if (unmannedAerialVehicle !=null)
{
Microwaveweapon microwaveweapon = Microwaveweapon.MicrowaveweaponList.Find(x => (x != null && x.ismicow == false));
if (microwaveweapon)
{
microwaveweapon.ismicow = true;
microwaveweapon.miceopos = unmannedAerialVehicle.transform;
microwaveweapon.miceopos = unmannedAerialVehicle.transform;
microwaveweapon.Orientation();
}
}
}
}
}
}

View File

@ -140,7 +140,6 @@ public class TerrestrialRadioInterferenceManger : MonoBehaviour
if (ison)
{
disturb = "HUF";
}
});
toggle2.onValueChanged.AddListener((ison) =>