无线电设备

This commit is contained in:
yulong 2023-12-28 09:44:45 +08:00
parent aaae693ceb
commit 07660aa843
4 changed files with 14 additions and 45 deletions

View File

@ -285,6 +285,8 @@ MonoBehaviour:
terrestrialRadioInterferenceManger: {fileID: 0}
dropdown: {fileID: 1649737330262137777}
Smallfrequency: 0
offon_buttn: {fileID: 6766835544386984180}
verify_buttn: {fileID: 7072383433655179645}
disturb:
--- !u!1 &1649737329020306510
GameObject:

View File

@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 1113159741}
m_IndirectSpecularColor: {r: 0.1623193, g: 0.306149, b: 0.6692998, a: 1}
m_IndirectSpecularColor: {r: 0.16234678, g: 0.30616558, b: 0.66920704, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
@ -49036,7 +49036,6 @@ MonoBehaviour:
deviceimages1: []
deviceimages: []
modellist: []
isp: 0
--- !u!114 &1436809535
MonoBehaviour:
m_ObjectHideFlags: 0
@ -63094,7 +63093,7 @@ MonoBehaviour:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
randSeed: 1112718328
randSeed: 1167812328
isDoingTransition: 0
minimumHeight: 0
--- !u!114 &1820978574
@ -89754,16 +89753,6 @@ PrefabInstance:
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 5839716182141322363, guid: 38fb1def99b2cd147a96842efe5a355b,
type: 3}
propertyPath: offon_buttn
value:
objectReference: {fileID: 6596814515507213671}
- target: {fileID: 5839716182141322363, guid: 38fb1def99b2cd147a96842efe5a355b,
type: 3}
propertyPath: verify_buttn
value:
objectReference: {fileID: 6596814515507213670}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 38fb1def99b2cd147a96842efe5a355b, type: 3}
--- !u!224 &6596814515507213669 stripped
@ -89772,30 +89761,6 @@ RectTransform:
type: 3}
m_PrefabInstance: {fileID: 6596814515507213668}
m_PrefabAsset: {fileID: 0}
--- !u!114 &6596814515507213670 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 7072383433655179645, guid: 38fb1def99b2cd147a96842efe5a355b,
type: 3}
m_PrefabInstance: {fileID: 6596814515507213668}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &6596814515507213671 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 6766835544386984180, guid: 38fb1def99b2cd147a96842efe5a355b,
type: 3}
m_PrefabInstance: {fileID: 6596814515507213668}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!23 &6711047951255075265
MeshRenderer:
m_ObjectHideFlags: 0

View File

@ -14,10 +14,7 @@ public class DragManager : MonoSingleton<DragManager>
public List<string> modellist = new List<string>();//存入最开始场景生成模型的名字
public Dictionary<string,int> model = new Dictionary<string,int>();
/// <summary>
/// 判断无线电干扰是否启用
/// </summary>
public bool isp=false;
void Start()
{

View File

@ -8,6 +8,7 @@ using Newtonsoft.Json;
using static InterfaceManager;
using System;
using UnityEngine.UI;
using UnityEngine.EventSystems;
/// <summary>
/// 地面无线电干扰控制
@ -92,7 +93,6 @@ public class TerrestrialRadioInterferenceManger : MonoBehaviour
/// </summary>
public LayerMask ground;
void Start()
{
equipmentCommon = GetComponent<EquipmentCommon>();
@ -131,11 +131,16 @@ public class TerrestrialRadioInterferenceManger : MonoBehaviour
{
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
RaycastHit hit;
if (Physics.Raycast(ray, out hit, 1000))
if (Physics.Raycast(ray, out hit))
{
if (hit.transform.tag== "AttackTarget1")
if (EventSystem.current.IsPointerOverGameObject())
{
return;
}
if (hit.transform.tag == "AttackTarget1")
{
Conversionfrequency.Instance.terrestrialRadioInterferenceManger = hit.transform.GetComponent<TerrestrialRadioInterferenceManger>();
Conversionfrequency.Instance.transform.position = Camera.main.WorldToScreenPoint(hit.point);
Conversionfrequency.Instance.gameObject.SetActive(true);
}
}
@ -176,7 +181,7 @@ public class TerrestrialRadioInterferenceManger : MonoBehaviour
default:
break;
}
DragManager.Instance.isp = false;
}
#region
/// <summary>