From 27b5f84e4c605460ff1191654d91fe54fc5010e2 Mon Sep 17 00:00:00 2001 From: gaoguozheng Date: Mon, 25 Sep 2023 15:01:04 +0800 Subject: [PATCH] 9.25-2 --- GQ_URP/GQ/Assets/Scripts/Camera/CameraMgr.cs | 64 ++++++-- GQ_URP/GQ/Assets/Scripts/Camera/CameraRT.cs | 32 +--- GQ_URP/GQ/Assets/Scripts/SearchName.cs | 38 +++-- .../GQ/Assets/Scripts/WJ/CabinetUIManager.cs | 2 + .../Scripts/WJ/LineGroup/LineGroupItem.cs | 28 +++- GQ_URP/GQ/Assets/Scripts/WJ/UIToCabinet.cs | 150 +++++++++++++++++- 6 files changed, 249 insertions(+), 65 deletions(-) diff --git a/GQ_URP/GQ/Assets/Scripts/Camera/CameraMgr.cs b/GQ_URP/GQ/Assets/Scripts/Camera/CameraMgr.cs index 62f86582d..82c28e0b9 100644 --- a/GQ_URP/GQ/Assets/Scripts/Camera/CameraMgr.cs +++ b/GQ_URP/GQ/Assets/Scripts/Camera/CameraMgr.cs @@ -84,28 +84,62 @@ public class CameraMgr : MonoSingleton public void Update() { - if (GameManager.Inst.magnifyState) + //if (GameManager.Inst.magnifyState) + //{ + // show_roof(true); + //} + //else + //{ + // show_roof(false); + //} + + if (Camera.main.transform.position.y <= 3) { - show_roof(true); + if (ExtendedFlycam.Inst.room == ExtendedFlycam.Room.None) + { + if (ExtendedFlycam.Inst.jiFang[1].activeInHierarchy && ExtendedFlycam.Inst.peiDianShi[1].activeInHierarchy) + { + ExtendedFlycam.Inst.peiDianShiD.SetActive(true); + ExtendedFlycam.Inst.jiFangD.SetActive(true); + } + + } + else if (ExtendedFlycam.Inst.room == ExtendedFlycam.Room.机房) + { + if (ExtendedFlycam.Inst.jiFang[1].activeInHierarchy) + { + ExtendedFlycam.Inst.peiDianShiD.SetActive(false); + ExtendedFlycam.Inst.jiFangD.SetActive(true); + } + } + else if (ExtendedFlycam.Inst.room == ExtendedFlycam.Room.配电室) + { + if (ExtendedFlycam.Inst.peiDianShi[1].activeInHierarchy) + { + ExtendedFlycam.Inst.peiDianShiD.SetActive(true); + ExtendedFlycam.Inst.jiFangD.SetActive(false); + } + } } else { - show_roof(false); + ExtendedFlycam.Inst.peiDianShiD.SetActive(false); + ExtendedFlycam.Inst.jiFangD.SetActive(false); } } - public void show_roof(bool isshow) - { - if (ExtendedFlycam.Inst.room == ExtendedFlycam.Room.机房) - ExtendedFlycam.Inst.jiFangD.SetActive(isshow); - else if (ExtendedFlycam.Inst.room == ExtendedFlycam.Room.配电室) - ExtendedFlycam.Inst.peiDianShiD.SetActive(isshow); - else - { - ExtendedFlycam.Inst.peiDianShiD.SetActive(isshow); - ExtendedFlycam.Inst.jiFangD.SetActive(isshow); - } - } + //public void show_roof(bool isshow) + //{ + // if (ExtendedFlycam.Inst.room == ExtendedFlycam.Room.机房) + // ExtendedFlycam.Inst.jiFangD.SetActive(isshow); + // else if (ExtendedFlycam.Inst.room == ExtendedFlycam.Room.配电室) + // ExtendedFlycam.Inst.peiDianShiD.SetActive(isshow); + // else + // { + // ExtendedFlycam.Inst.peiDianShiD.SetActive(isshow); + // ExtendedFlycam.Inst.jiFangD.SetActive(isshow); + // } + //} #region 自动切换预设视角 //[Header("漫游视角自动切换")] diff --git a/GQ_URP/GQ/Assets/Scripts/Camera/CameraRT.cs b/GQ_URP/GQ/Assets/Scripts/Camera/CameraRT.cs index a823b3b1f..963d5f580 100644 --- a/GQ_URP/GQ/Assets/Scripts/Camera/CameraRT.cs +++ b/GQ_URP/GQ/Assets/Scripts/Camera/CameraRT.cs @@ -196,26 +196,6 @@ public class CameraRT : MonoBehaviour } else { - //switch (ExtendedFlycam.Inst.room) - //{ - // case ExtendedFlycam.Room.None: - // break; - // case ExtendedFlycam.Room.机房: - // { - // pos = new Vector3(2.55f, 20.82f, -7.50f); - // rot = new Vector3(90, 180, 0); - // pos_target = new Vector3(2.2f, -3.9f, -7f); - // _x = 180; - // _y = 90; - // maxDistance = distance = 25; - // } - // break; - // case ExtendedFlycam.Room.配电室: - // break; - // default: - // break; - //} - { pos = new Vector3(-3.615f, 26.878f, -5.0f); rot = new Vector3(90, 180, 0); @@ -244,12 +224,14 @@ public class CameraRT : MonoBehaviour //x = cam.transform.localEulerAngles.y; //y = cam.transform.localEulerAngles.x; - - for (int i = 0; i < GameManager.Inst.Cabinets_go.Count; i++) + if (Menu.M_数字孪生_接地网 != CabinetUIManager.Instance.current_menu) { - GameManager.Inst.Cabinets_go[i].GetComponent().My_magnifyState = false; - GameManager.Inst.Cabinets_go[i].SetActive(true); - GameManager.Inst.Cabinets_go[i].GetComponent().F2(); + for (int i = 0; i < GameManager.Inst.Cabinets_go.Count; i++) + { + GameManager.Inst.Cabinets_go[i].GetComponent().My_magnifyState = false; + GameManager.Inst.Cabinets_go[i].SetActive(true); + GameManager.Inst.Cabinets_go[i].GetComponent().F2(); + } } PatternChoose.Inst.sb_bj_page.SetActive(false); PatternChoose.Inst.sb_xz_page.SetActive(false); diff --git a/GQ_URP/GQ/Assets/Scripts/SearchName.cs b/GQ_URP/GQ/Assets/Scripts/SearchName.cs index 13570dd2a..c32b4583e 100644 --- a/GQ_URP/GQ/Assets/Scripts/SearchName.cs +++ b/GQ_URP/GQ/Assets/Scripts/SearchName.cs @@ -211,13 +211,9 @@ public class SearchName : MonoBehaviour scrollViewContent.GetChild(co).GetComponent