修改多窗口 打开 逻辑

This commit is contained in:
YangHua 2024-02-06 17:54:56 +08:00
parent 31c8629b05
commit d06b7f36a6
19 changed files with 109 additions and 59 deletions

View File

@ -3586,6 +3586,11 @@ PrefabInstance:
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1649737328956898976, guid: 38fb1def99b2cd147a96842efe5a355b,
type: 3}
propertyPath: m_TagString
value: Importance
objectReference: {fileID: 0}
- target: {fileID: 1649737328956898977, guid: 38fb1def99b2cd147a96842efe5a355b,
type: 3}
propertyPath: m_LocalPosition.x

View File

@ -19623,7 +19623,7 @@ GameObject:
- component: {fileID: 2807491000924113457}
m_Layer: 12
m_Name: Image
m_TagString: Untagged
m_TagString: Radar
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

View File

@ -2122,6 +2122,11 @@ PrefabInstance:
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1649737328956898976, guid: 38fb1def99b2cd147a96842efe5a355b,
type: 3}
propertyPath: m_TagString
value: WRJParameter
objectReference: {fileID: 0}
- target: {fileID: 1649737328956898977, guid: 38fb1def99b2cd147a96842efe5a355b,
type: 3}
propertyPath: m_LocalPosition.x
@ -2791,6 +2796,11 @@ PrefabInstance:
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1649737328956898976, guid: 38fb1def99b2cd147a96842efe5a355b,
type: 3}
propertyPath: m_TagString
value: WRJParameter
objectReference: {fileID: 0}
- target: {fileID: 1649737328956898977, guid: 38fb1def99b2cd147a96842efe5a355b,
type: 3}
propertyPath: m_LocalPosition.x

View File

@ -12822,6 +12822,11 @@ PrefabInstance:
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6102700022742998670, guid: b2cb817bb62743a4194cd9d89f07e27d,
type: 3}
propertyPath: m_TagString
value: Importance
objectReference: {fileID: 0}
m_RemovedComponents:
- {fileID: 1076142016709017099, guid: b2cb817bb62743a4194cd9d89f07e27d, type: 3}
m_SourcePrefab: {fileID: 100100000, guid: b2cb817bb62743a4194cd9d89f07e27d, type: 3}

View File

@ -248,7 +248,7 @@ GameObject:
- component: {fileID: 1578225509420461004}
m_Layer: 12
m_Name: Image
m_TagString: Untagged
m_TagString: Radar
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@ -944,6 +944,11 @@ PrefabInstance:
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1649737328956898976, guid: 38fb1def99b2cd147a96842efe5a355b,
type: 3}
propertyPath: m_TagString
value: Importance
objectReference: {fileID: 0}
- target: {fileID: 1649737328956898977, guid: 38fb1def99b2cd147a96842efe5a355b,
type: 3}
propertyPath: m_LocalPosition.x

View File

@ -1090,7 +1090,7 @@ GameObject:
- component: {fileID: 8686255655278623726}
m_Layer: 5
m_Name: importance
m_TagString: Untagged
m_TagString: Importance
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@ -2653,13 +2653,6 @@ MonoBehaviour:
ModerDamage: {fileID: 2840960697985760213}
regulate: {fileID: 4820533728664913016}
buttonreg: {fileID: 7363043795831063353}
toggle1: {fileID: 78723881495536872}
toggle2: {fileID: 3463523368336500832}
toggle3: {fileID: 3619221509897912575}
toggle4: {fileID: 28412645170237004}
toggle5: {fileID: 8932471483062020681}
toggle6: {fileID: 64890494959671527}
toggle7: {fileID: 4401106011680143311}
togFrequencyBands:
- {fileID: 78723881495536872}
- {fileID: 3463523368336500832}
@ -2726,7 +2719,7 @@ GameObject:
- component: {fileID: 1014353712495964052}
m_Layer: 5
m_Name: Canvas
m_TagString: Importance
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

View File

@ -281,7 +281,7 @@ GameObject:
- component: {fileID: 1422880735768166433}
m_Layer: 5
m_Name: Canvas
m_TagString: Importance
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@ -770,7 +770,7 @@ GameObject:
- component: {fileID: 1747500451976562533}
m_Layer: 5
m_Name: importance
m_TagString: Untagged
m_TagString: Importance
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@ -2826,13 +2826,6 @@ MonoBehaviour:
ModerDamage: {fileID: 1467464424326605954}
regulate: {fileID: 2445121072340223621}
buttonreg: {fileID: 1893370117554305087}
toggle1: {fileID: 6760580611336481383}
toggle2: {fileID: 2327747177229680297}
toggle3: {fileID: 6205561511136672778}
toggle4: {fileID: 4866093980683021871}
toggle5: {fileID: 1595232079232995888}
toggle6: {fileID: 848134281435870856}
toggle7: {fileID: 6994627430635325071}
togFrequencyBands:
- {fileID: 6760580611336481383}
- {fileID: 2327747177229680297}

View File

@ -1558,7 +1558,7 @@ GameObject:
- component: {fileID: 5969528349560588974}
m_Layer: 5
m_Name: importance
m_TagString: Untagged
m_TagString: Importance
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@ -2513,7 +2513,7 @@ GameObject:
- component: {fileID: 4013790001393954177}
m_Layer: 5
m_Name: Canvas
m_TagString: Importance
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@ -2826,13 +2826,6 @@ MonoBehaviour:
ModerDamage: {fileID: 7378831111228137673}
regulate: {fileID: 5625621529173534083}
buttonreg: {fileID: 2359957618957220921}
toggle1: {fileID: 2987344993920604129}
toggle2: {fileID: 4263437241937524701}
toggle3: {fileID: 2372794671036074061}
toggle4: {fileID: 6045683915690793988}
toggle5: {fileID: 3776191318234792201}
toggle6: {fileID: 6688120530323237334}
toggle7: {fileID: 8540854955145205225}
togFrequencyBands:
- {fileID: 2987344993920604129}
- {fileID: 4263437241937524701}

View File

@ -38,7 +38,7 @@ public class Microwaveweapon : MonoBehaviour
public string MicrowaveinterferenceAngle;
#endregion
/// <summary>
/// <summary>
/// 是否演练开关
/// </summary>
private bool _isStartRehearsing = false;
@ -95,7 +95,7 @@ public class Microwaveweapon : MonoBehaviour
MicrowaveweaponList.Add(this);
// 订阅布尔值变化事件
OnActivationChanged += OnActivationChangedHandler;
}
/// <summary>
/// 演练是否开始开关
@ -118,7 +118,7 @@ public class Microwaveweapon : MonoBehaviour
/// </summary>
private void Offmode()
{
if (equipment.isPlayer&&coroutine!=null)
if (equipment.isPlayer && coroutine != null)
{
StopCoroutine(Timern());
coroutine = null;
@ -130,7 +130,7 @@ public class Microwaveweapon : MonoBehaviour
/// </summary>
private void Openmode()
{
if (equipment.isPlayer&&coroutine ==null)
if (equipment.isPlayer && coroutine == null)
{
StartCoroutine(Timern());
}
@ -140,7 +140,7 @@ public class Microwaveweapon : MonoBehaviour
while (true)
{
yield return new WaitForSeconds(microwtimer + 1.5f);
if (miceopos!=null&&ismicow)
if (miceopos != null && ismicow)
{
Launchattack();
@ -155,9 +155,12 @@ public class Microwaveweapon : MonoBehaviour
protected string Getmicdata()
{
//Debug.Log("上传位置");
return string.Format("{0},{1},{2},{3},{4}","Micow", equipment.deviceID, miceopos.transform.position.x,miceopos.transform.position.y,miceopos.transform.position.z);
return string.Format("{0},{1},{2},{3},{4}", "Micow", equipment.deviceID, miceopos.transform.position.x, miceopos.transform.position.y, miceopos.transform.position.z);
}
private void OnMouseDown()
{
GameManager.Instance.GetAllImportance();
}
/// <summary>
/// 获取设备的参数
/// </summary>
@ -169,7 +172,7 @@ public class Microwaveweapon : MonoBehaviour
{
case "储能间隔时间:":
Storageintervaltime = weaponitemone[i].para_value;
microwtimer =float.Parse(Storageintervaltime);
microwtimer = float.Parse(Storageintervaltime);
break;
case "毁伤目标累积作用时间:":
Microwavedamagetime = weaponitemone[i].para_value;
@ -198,7 +201,7 @@ public class Microwaveweapon : MonoBehaviour
if (miceopos != null)
{
microwavepoint.transform.DOLookAt(miceopos.position, 0.1f).SetEase(Ease.Linear);
}
}
/// <summary>
@ -206,13 +209,13 @@ public class Microwaveweapon : MonoBehaviour
/// </summary>
public void Launchattack()
{
if (miceopos!=null)
if (miceopos != null)
{
micdistance = Vector3.Distance(miceopos.position, transform.position);
var newdata = Getmicdata();
//_ = SyncCreateRoom.SendMessageAsync(string.Format("send2room {0}", newdata));
MQTTManager.instance.SendData(MQTTManager.instance.Micow, newdata);
microblog.MicrowaveDisplay(micdistance / 10+1, 0.5f);
microblog.MicrowaveDisplay(micdistance / 10 + 1, 0.5f);
Closeattack(miceopos);
}
}
@ -223,8 +226,8 @@ public class Microwaveweapon : MonoBehaviour
/// <returns></returns>
private void Closeattack(Transform pos)
{
UnmannedAerialVehicle unmannedAerialVehicle =pos.GetComponent<UnmannedAerialVehicle>();
if (unmannedAerialVehicle!=null)
UnmannedAerialVehicle unmannedAerialVehicle = pos.GetComponent<UnmannedAerialVehicle>();
if (unmannedAerialVehicle != null)
{
StartCoroutine(Destructiondata(unmannedAerialVehicle));
StartCoroutine(Offlaserstrike());
@ -244,7 +247,7 @@ public class Microwaveweapon : MonoBehaviour
game.transform.SetParent(null);
game.SetActive(true);
Destroy(unmannedAerialVehicle.gameObject);
}
/// <summary>
/// 销毁无人机
@ -253,7 +256,7 @@ public class Microwaveweapon : MonoBehaviour
/// <returns></returns>
public string Aeroplane(UnmannedAerialVehicle unmannedAerialVehicle)
{
return string.Format("{0},{1},{2}","Planedata",unmannedAerialVehicle.unmannedAerialVehicleManage.equipmentCommon.deviceID,unmannedAerialVehicle.serialNumber);
return string.Format("{0},{1},{2}", "Planedata", unmannedAerialVehicle.unmannedAerialVehicleManage.equipmentCommon.deviceID, unmannedAerialVehicle.serialNumber);
}
/// <summary>
@ -271,13 +274,14 @@ public class Microwaveweapon : MonoBehaviour
public void Microwavetransmission(string[] data)
{
//接收激光下发的位置
Vector3 vector =new Vector3(float.Parse(data[2]), float.Parse(data[3]),float.Parse(data[4]));
Vector3 vector = new Vector3(float.Parse(data[2]), float.Parse(data[3]), float.Parse(data[4]));
float _micdistance = Vector3.Distance(vector, transform.position);
microwavepoint.transform.DOLookAt(vector, 0.1f).SetEase(Ease.Linear).OnComplete(() => {
microwavepoint.transform.DOLookAt(vector, 0.1f).SetEase(Ease.Linear).OnComplete(() =>
{
microblog.MicrowaveDisplay(_micdistance / 10 + 1, 0.5f);
StartCoroutine(Offlaserstrike());
});
}
private void OnDestroy()
{

View File

@ -395,12 +395,9 @@ public class Spectrumdetection : MonoBehaviour
private void OnMouseDown()
{
if (equipmentCommon.isPlayer)
{
SpectrumdetectionUI.SetActive(true);
}
if (!GlobalFlag.isStartRehearsing && GlobalFlag.blueOrRed == 1)
{
GameManager.Instance.GetAllImportance();
EquipmentCommon equipmentCommon1 = GetComponent<EquipmentCommon>();
if (equipmentCommon.deviceID == equipmentCommon1.deviceID)
{
@ -408,6 +405,10 @@ public class Spectrumdetection : MonoBehaviour
Frequencyiamge.gameObject.SetActive(true);
}
}
if (equipmentCommon.isPlayer)
{
SpectrumdetectionUI.SetActive(true);
}
//SpectrumdetectionUI.SetActive(true);
}
private void OnDestroy()

View File

@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 1113159741}
m_IndirectSpecularColor: {r: 0.066868424, g: 0.12216938, b: 0.2541184, a: 1}
m_IndirectSpecularColor: {r: 0.06497114, g: 0.121774174, b: 0.26588207, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
@ -6834,7 +6834,7 @@ GameObject:
- component: {fileID: 147647013}
- component: {fileID: 147647014}
m_Layer: 5
m_Name: Canvas
m_Name: MainCanvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -69824,7 +69824,7 @@ MonoBehaviour:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
randSeed: 25527625
randSeed: 753317671
isDoingTransition: 0
minimumHeight: 0
--- !u!114 &1820978574

View File

@ -22,7 +22,7 @@ public class DragController : MonoBehaviour, IBeginDragHandler, IEndDragHandler,
void Awake()
{
mastermanagement = GameObject.Find("MianCanvas").GetComponent<Mastermanagement>();
mastermanagement = GameObject.Find("MainCanvas").GetComponent<Mastermanagement>();
}
public void OnBeginDrag(PointerEventData eventData)
{

View File

@ -525,6 +525,35 @@ public class GameManager : MonoSingleton<GameManager>
}
}
/// <summary>
/// 获取 所有 参数 修改 面板
/// </summary>
/// <returns></returns>
public void GetAllImportance()
{
GameObject[] radar = GameObject.FindGameObjectsWithTag("Radar");
GameObject[] objs = GameObject.FindGameObjectsWithTag("Importance");
for (int i = 0; i < objs.Length; i++)
{
objs[i].SetActive(false);
}
for (int i = 0; i < radar.Length; i++)
{
radar[i].SetActive(false);
}
}
/// <summary>
/// 获取无人机参数面板
/// </summary>
public void GetWRJParameter()
{
GameObject[] wrjParameter = GameObject.FindGameObjectsWithTag("WRJParameter");
for (int i = 0; i < wrjParameter.Length; i++)
{
wrjParameter[i].SetActive(false);
}
}
private void OnDisable()

View File

@ -23,6 +23,7 @@ namespace Assets.Zion.Scripts.Adam
{
if (UIBootstrap.Instance.GetRoleByIDPracticeId(GlobalFlag.practiceSeatId) == "0" && Input.GetMouseButtonDown(0))
{
if (EventSystem.current.IsPointerOverGameObject()) return;
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
RaycastHit hitInfo;
if (Physics.Raycast(ray, out hitInfo, 1000))
@ -40,16 +41,19 @@ namespace Assets.Zion.Scripts.Adam
}
else
{
GameManager.Instance.GetWRJParameter();
wrjMenuSetPanel.localScale = Vector3.zero;
}
}
else
{
GameManager.Instance.GetWRJParameter();
wrjMenuSetPanel.localScale = Vector3.zero;
}
}
else
{
GameManager.Instance.GetWRJParameter();
wrjMenuSetPanel.localScale = Vector3.zero;
}
}

View File

@ -104,7 +104,7 @@ public class HighPriorityTarget : MonoBehaviour
MQTTManager.instance.SendData(MQTTManager.instance.BandSetting, nowData);
}
}
public void FrequencyGamepos(string _frequency)
{
int layerValue = LayerMask.NameToLayer(_frequency);
@ -133,6 +133,8 @@ public class HighPriorityTarget : MonoBehaviour
HighPriorityTarget highPriorityTarget = hit.transform.GetComponent<HighPriorityTarget>();
if (!GlobalFlag.isStartRehearsing && highPriorityTarget && highPriorityTarget.Number == Number)
{
GameManager.Instance.GetAllImportance();
regulate.transform.position = Camera.main.WorldToScreenPoint(hit.point);
regulate.gameObject.SetActive(true);
}
@ -153,7 +155,7 @@ public class HighPriorityTarget : MonoBehaviour
{
HP -= 10;
string nowData = GetSyncDis(Pos);
Debug.Log("发送:"+nowData);
Debug.Log("发送:" + nowData);
//DeviceManager.Instance.send2roomStr.Enqueue(nowData);
MQTTManager.instance.SendData(MQTTManager.instance.KeyTarget, nowData);
}
@ -207,7 +209,7 @@ public class HighPriorityTarget : MonoBehaviour
UploadLogMain uploadLogMain = new UploadLogMain();
uploadLogMain.PracticeId = GlobalFlag.practiceSubjectID;
uploadLogMain.ThinkId = GlobalFlag.currentThinkId;
string log = currentTime + " " + "重要用户(" + Number + ")频段设置为" + frequency;
string log = currentTime + " " + "重要用户(" + Number + ")频段设置为" + frequency;
uploadLogMain.log = log;
uploadLogMains.Add(uploadLogMain);
string uploadLogMainJson = JsonConvert.SerializeObject(uploadLogMains);

View File

@ -362,7 +362,7 @@ public class RadarManger : MonoBehaviour
{
if (equipmentCommon.isPlayer && GlobalFlag.blueOrRed == 1)
{
GameManager.Instance.GetAllImportance();
imageprs.gameObject.SetActive(true);
}
}

View File

@ -566,6 +566,7 @@ public class TerrestrialRadioInterferenceManger : MonoBehaviour
{
if (!GlobalFlag.isStartRehearsing && GlobalFlag.blueOrRed == 1 && Input.GetMouseButtonDown(0))
{
GameManager.Instance.GetAllImportance();
Waveimage.transform.position = Camera.main.WorldToScreenPoint(transform.position);
Waveimage.gameObject.SetActive(true);
}

View File

@ -48,12 +48,14 @@ public class UnmannedAerialVehicleUI : MonoBehaviour
btnFrequencyBand.onClick.AddListener(() => {
if (unmannedAerialVehicleManage)
{
GameManager.Instance.GetWRJParameter();
unmannedAerialVehicleManage.FrequencyBand.SetActive(true);
}
});
btnSurveillanceFrequencyBand.onClick.AddListener(() => {
if (unmannedAerialVehicleManage)
{
GameManager.Instance.GetWRJParameter();
unmannedAerialVehicleManage.SurveillanceFrequencyBand.SetActive(true);
}
});
@ -74,6 +76,7 @@ public class UnmannedAerialVehicleUI : MonoBehaviour
{
if (unmannedAerialVehicleManage)
{
GameManager.Instance.GetWRJParameter();
switch (unmannedAerialVehicleManage.wrjModel)
{
case WRJModel.:

View File

@ -10,6 +10,8 @@ TagManager:
- WRJ1
- AttackTarget1
- Importance
- Radar
- WRJParameter
layers:
- Default
- TransparentFX