This commit is contained in:
高国正 2023-09-25 15:01:04 +08:00
parent cb4158c8bf
commit 27b5f84e4c
6 changed files with 249 additions and 65 deletions

View File

@ -84,28 +84,62 @@ public class CameraMgr : MonoSingleton<CameraMgr>
public void Update() 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 else
{ {
show_roof(false); ExtendedFlycam.Inst.peiDianShiD.SetActive(false);
ExtendedFlycam.Inst.jiFangD.SetActive(false);
} }
} }
public void show_roof(bool isshow) //public void show_roof(bool isshow)
{ //{
if (ExtendedFlycam.Inst.room == ExtendedFlycam.Room.) // if (ExtendedFlycam.Inst.room == ExtendedFlycam.Room.机房)
ExtendedFlycam.Inst.jiFangD.SetActive(isshow); // ExtendedFlycam.Inst.jiFangD.SetActive(isshow);
else if (ExtendedFlycam.Inst.room == ExtendedFlycam.Room.) // else if (ExtendedFlycam.Inst.room == ExtendedFlycam.Room.配电室)
ExtendedFlycam.Inst.peiDianShiD.SetActive(isshow); // ExtendedFlycam.Inst.peiDianShiD.SetActive(isshow);
else // else
{ // {
ExtendedFlycam.Inst.peiDianShiD.SetActive(isshow); // ExtendedFlycam.Inst.peiDianShiD.SetActive(isshow);
ExtendedFlycam.Inst.jiFangD.SetActive(isshow); // ExtendedFlycam.Inst.jiFangD.SetActive(isshow);
} // }
} //}
#region #region
//[Header("漫游视角自动切换")] //[Header("漫游视角自动切换")]

View File

@ -196,26 +196,6 @@ public class CameraRT : MonoBehaviour
} }
else 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); pos = new Vector3(-3.615f, 26.878f, -5.0f);
rot = new Vector3(90, 180, 0); rot = new Vector3(90, 180, 0);
@ -244,12 +224,14 @@ public class CameraRT : MonoBehaviour
//x = cam.transform.localEulerAngles.y; //x = cam.transform.localEulerAngles.y;
//y = cam.transform.localEulerAngles.x; //y = cam.transform.localEulerAngles.x;
if (Menu.M_数字孪生_接地网 != CabinetUIManager.Instance.current_menu)
for (int i = 0; i < GameManager.Inst.Cabinets_go.Count; i++)
{ {
GameManager.Inst.Cabinets_go[i].GetComponent<ClickEvent>().My_magnifyState = false; for (int i = 0; i < GameManager.Inst.Cabinets_go.Count; i++)
GameManager.Inst.Cabinets_go[i].SetActive(true); {
GameManager.Inst.Cabinets_go[i].GetComponent<TransparentGlow>().F2(); GameManager.Inst.Cabinets_go[i].GetComponent<ClickEvent>().My_magnifyState = false;
GameManager.Inst.Cabinets_go[i].SetActive(true);
GameManager.Inst.Cabinets_go[i].GetComponent<TransparentGlow>().F2();
}
} }
PatternChoose.Inst.sb_bj_page.SetActive(false); PatternChoose.Inst.sb_bj_page.SetActive(false);
PatternChoose.Inst.sb_xz_page.SetActive(false); PatternChoose.Inst.sb_xz_page.SetActive(false);

View File

@ -211,13 +211,9 @@ public class SearchName : MonoBehaviour
scrollViewContent.GetChild(co).GetComponent<Button>().onClick.AddListener(() => scrollViewContent.GetChild(co).GetComponent<Button>().onClick.AddListener(() =>
{ {
//List<TransparentGlow> t = new List<TransparentGlow>(); //List<TransparentGlow> t = new List<TransparentGlow>();
for (int i = 0; i < GameManager.Inst.Cabinets_go.Count; i++)
{
GameManager.Inst.Cabinets_go[i].GetComponent<TransparentGlow>().F1();
}
//TransparentGlowManage.Inst.transparencyALL(t.ToArray()); //TransparentGlowManage.Inst.transparencyALL(t.ToArray());
CreateLine createLine = PatternChoose.Inst.huaXian; //CreateLine createLine = PatternChoose.Inst.huaXian;
//var lines = createLine.xianLan.Find(objs[i].GetComponent<PortQuery>().portList.remark).GetComponent<LineInfor>().lines; //var lines = createLine.xianLan.Find(objs[i].GetComponent<PortQuery>().portList.remark).GetComponent<LineInfor>().lines;
@ -251,12 +247,32 @@ public class SearchName : MonoBehaviour
{ {
if (item.cableGroupName == objs_str[co]) if (item.cableGroupName == objs_str[co])
{ {
; if (ExtendedFlycam.Room.ÅäµçÊÒ != ExtendedFlycam.Inst.room)
GameObject go1 = GameManager.Inst.FindParent(item.lines[0].gameObject, GameManager.Inst.IsDesiredParent); {
GameObject go2 = GameManager.Inst.FindParent(item.lines[1].gameObject, GameManager.Inst.IsDesiredParent); for (int i = 0; i < GameManager.Inst.Cabinets_go.Count; i++)
transparentGlows.Add(go1.GetComponent<TransparentGlow>()); {
transparentGlows.Add(go2.GetComponent<TransparentGlow>()); GameManager.Inst.Cabinets_go[i].GetComponent<TransparentGlow>().F1();
item.gameObject.SetActive(true); }
;
GameObject go1 = GameManager.Inst.FindParent(item.lines[0].gameObject, GameManager.Inst.IsDesiredParent);
GameObject go2 = GameManager.Inst.FindParent(item.lines[1].gameObject, GameManager.Inst.IsDesiredParent);
transparentGlows.Add(go1.GetComponent<TransparentGlow>());
transparentGlows.Add(go2.GetComponent<TransparentGlow>());
item.gameObject.SetActive(true);
}
else
{
PatternChoose.Inst.quanJing_fuc();
for (int i = 0; i < GameManager.Inst.Cabinets_go.Count; i++)
{
GameManager.Inst.Cabinets_go[i].GetComponent<TransparentGlow>().F1();
}
GameObject go1 = GameManager.Inst.FindParent(item.lines[0].gameObject, GameManager.Inst.IsDesiredParent);
GameObject go2 = GameManager.Inst.FindParent(item.lines[1].gameObject, GameManager.Inst.IsDesiredParent);
transparentGlows.Add(go1.GetComponent<TransparentGlow>());
transparentGlows.Add(go2.GetComponent<TransparentGlow>());
item.gameObject.SetActive(true);
}
} }
else if (dic_notContain.ContainsKey(objs_str[co])) else if (dic_notContain.ContainsKey(objs_str[co]))
{ {

View File

@ -31,6 +31,8 @@ public class CabinetUIManager : MonoBehaviour
public List<UPosItem> uPosItems; public List<UPosItem> uPosItems;
public GameObject jieDiWang;
private void Awake() private void Awake()
{ {
Instance = this; Instance = this;

View File

@ -59,12 +59,28 @@ public class LineGroupItem : MonoBehaviour
break; break;
} }
} }
if (string.IsNullOrEmpty(id)) return; if (!string.IsNullOrEmpty(id))
LineQuery.Inst.StartCoroutine(LineQuery.Inst.deleteJsonCoroutine(id, (x) => {
{ LineQuery.Inst.StartCoroutine(LineQuery.Inst.deleteJsonCoroutine(id, (x) =>
if (!string.IsNullOrEmpty(x)) {
LineObjectPool.Instance.PushItemToPool(this); if (!string.IsNullOrEmpty(x))
})); {
for (int i = 0; i < PatternChoose.Inst.xianlan.transform.childCount; i++)
{
if (PatternChoose.Inst.xianlan.transform.GetChild(i).name == info_text.text)
{
DestroyImmediate(PatternChoose.Inst.xianlan.transform.GetChild(i).gameObject);
break;
}
}
LineObjectPool.Instance.PushItemToPool(this);
}
}));
}
else
{
LineObjectPool.Instance.PushItemToPool(this);
}
} }
}); });
}); });

View File

@ -29,6 +29,24 @@ public class UIToCabinet : MonoBehaviour
public List<ClickEventLens> clickEventLens = new List<ClickEventLens>(); public List<ClickEventLens> clickEventLens = new List<ClickEventLens>();
public Transform Stagin; public Transform Stagin;
/// <summary>
/// 是否可以点击菜单
/// </summary>
public bool isContinue_menu = true;
/// <summary>
/// 当前是否有携程在运行
/// </summary>
//public bool isCoroutineRunning = false;
/// <summary>
/// 是否临时禁用Toggle的值变化
/// </summary>
//public bool isTemporarilyDisabled = false;
/// <summary>
/// 上一个Toggle
/// </summary>
//public Toggle last_Toggle;
private void Awake() private void Awake()
{ {
clickEventLens = GameObject.FindObjectsOfType<ClickEventLens>().ToList(); clickEventLens = GameObject.FindObjectsOfType<ClickEventLens>().ToList();
@ -80,7 +98,12 @@ public class UIToCabinet : MonoBehaviour
var index = i; var index = i;
toggles[index].onValueChanged.AddListener((ison) => toggles[index].onValueChanged.AddListener((ison) =>
{ {
if (!toggles[index].gameObject.activeInHierarchy) if (!isContinue_menu)
{
return;
}
if (!toggles[index].gameObject.activeInHierarchy || mask_img.activeSelf)
return; return;
if (ison) if (ison)
{ {
@ -123,7 +146,7 @@ public class UIToCabinet : MonoBehaviour
matchingMenu(toggles[index].name, createLine);//? matchingMenu(toggles[index].name, createLine);//?
createLine.deletxianLan(CabinetUIManager.Instance.current_menu); createLine.deletxianLan(CabinetUIManager.Instance.current_menu);
if (toggles[index].name == "Toggle_线缆连接展示" || toggles[index].name == "Toggle_线缆连接配置" || if (toggles[index].name == "Toggle_线缆连接展示" || toggles[index].name == "Toggle_线缆连接配置" ||
toggles[index].name == "Toggle_ÏßÀÂ×éÅäÖÃ" || toggles[index].name == "Toggle_ÏßÀÂÁ´½Ó") toggles[index].name == "Toggle_线缆组配置" || toggles[index].name == "Toggle_线缆连接")
{ {
xianlanpz.SetActive(true); xianlanpz.SetActive(true);
} }
@ -142,21 +165,34 @@ public class UIToCabinet : MonoBehaviour
/// <param name="toggle_name"></param> /// <param name="toggle_name"></param>
/// <param name="createLine"></param> /// <param name="createLine"></param>
/// <param name="ison"></param> /// <param name="ison"></param>
public void matchingMenu(string toggle_name, CreateLine createLine, bool ison = true) public void matchingMenu(string toggle_name, CreateLine createLine, Toggle toggle = null)
{ {
if (!isContinue_menu)
return;
isContinue_menu = false;
switch (toggle_name) switch (toggle_name)
{ {
case "Toggle_设备告警": case "Toggle_设备告警":
{ {
//if (isCoroutineRunning)
// break;
//isCoroutineRunning = true;
StartCoroutine(Loadinfo(Menu.M_全景监控_设备告警, (x) => StartCoroutine(Loadinfo(Menu.M_全景监控_设备告警, (x) =>
{ {
if (string.IsNullOrEmpty(x)) return; //isCoroutineRunning = false;
if (string.IsNullOrEmpty(x))
{
isContinue_menu = true;
return;
}
init(Menu.M_全景监控_设备告警); init(Menu.M_全景监控_设备告警);
//ExtendedFlycam.Inst.QuanJing(); //ExtendedFlycam.Inst.QuanJing();
GameManager.Inst.search_box.GetComponent<SearchName>().LoadCabinet(SearchName.SearchType.); GameManager.Inst.search_box.GetComponent<SearchName>().LoadCabinet(SearchName.SearchType.);
GameManager.Inst.search_box.SetActive(true); GameManager.Inst.search_box.SetActive(true);
ExtendedFlycam.Inst.QieHuan(Menu.M_全景监控_设备告警); ExtendedFlycam.Inst.QieHuan(Menu.M_全景监控_设备告警);
CabinetUIManager.ChangeMenu(Menu.M_全景监控_设备告警); CabinetUIManager.ChangeMenu(Menu.M_全景监控_设备告警);
isContinue_menu = true;
})); }));
} }
break; break;
@ -174,21 +210,30 @@ public class UIToCabinet : MonoBehaviour
// CabinetUIManager.ChangeMenu(Menu.M_全景监控_设备告警); // CabinetUIManager.ChangeMenu(Menu.M_全景监控_设备告警);
//})); //}));
#endregion #endregion
for (int i = 0; i < second_level_menu.Count; i++)
second_level_menu[i].SetActive(false);
second_level_menu[0].SetActive(true);
string s = ""; string s = "";
for (int i = 0; i < 6; i++) for (int i = 0; i < 6; i++)
{ {
if (WebInteraction.Inst.menu_struct[i]._ison) if (WebInteraction.Inst.menu_struct[i]._ison)
{ {
s = WebInteraction.Inst.menu_struct[i].toggle.gameObject.name; s = WebInteraction.Inst.menu_struct[i].toggle.gameObject.name;
WebInteraction.Inst.menu_struct[i].toggle.isOn = true;
break; break;
} }
} }
if (!string.IsNullOrEmpty(s)) if (!string.IsNullOrEmpty(s))
{
isContinue_menu = true;
matchingMenu(s, createLine); matchingMenu(s, createLine);
}
} }
break; break;
case "Toggle_数字孪生": case "Toggle_数字孪生":
{ {
for (int i = 0; i < second_level_menu.Count; i++)
second_level_menu[i].SetActive(false);
#region old #region old
//rongLaing.SetActive(true); //rongLaing.SetActive(true);
//init(Menu.M_数字孪生_机柜容量); //init(Menu.M_数字孪生_机柜容量);
@ -198,30 +243,45 @@ public class UIToCabinet : MonoBehaviour
//GameManager.Inst.search_box.GetComponent<SearchName>().LoadCabinet(SearchName.SearchType.机柜); //GameManager.Inst.search_box.GetComponent<SearchName>().LoadCabinet(SearchName.SearchType.机柜);
//CabinetUIManager.ChangeMenu(Menu.M_数字孪生_机柜容量); //CabinetUIManager.ChangeMenu(Menu.M_数字孪生_机柜容量);
#endregion #endregion
second_level_menu[2].SetActive(true);
string s = ""; string s = "";
for (int i = 6; i < 9; i++) for (int i = 6; i < 9; i++)
{ {
if (WebInteraction.Inst.menu_struct[i]._ison) if (WebInteraction.Inst.menu_struct[i]._ison)
{ {
s = WebInteraction.Inst.menu_struct[i].toggle.gameObject.name; s = WebInteraction.Inst.menu_struct[i].toggle.gameObject.name;
WebInteraction.Inst.menu_struct[i].toggle.isOn = true;
break; break;
} }
} }
if (!string.IsNullOrEmpty(s)) if (!string.IsNullOrEmpty(s))
{
isContinue_menu = true;
matchingMenu(s, createLine); matchingMenu(s, createLine);
}
} }
break; break;
case "Toggle_温湿度": case "Toggle_温湿度":
{ {
//if (isCoroutineRunning)
// break;
//isCoroutineRunning = true;
StartCoroutine(Loadinfo(Menu.M_全景监控_温度, (x) => StartCoroutine(Loadinfo(Menu.M_全景监控_温度, (x) =>
{ {
if (string.IsNullOrEmpty(x)) return; //isCorkoutineRunning = false;
if (string.IsNullOrEmpty(x))
{
isContinue_menu = true;
return;
}
init(Menu.M_全景监控_温度); init(Menu.M_全景监控_温度);
//ExtendedFlycam.Inst.QuanJing(); //ExtendedFlycam.Inst.QuanJing();
GameManager.Inst.search_box.GetComponent<SearchName>().LoadCabinet(SearchName.SearchType.); GameManager.Inst.search_box.GetComponent<SearchName>().LoadCabinet(SearchName.SearchType.);
GameManager.Inst.search_box.SetActive(true); GameManager.Inst.search_box.SetActive(true);
ExtendedFlycam.Inst.QieHuan(Menu.M_全景监控_温度); ExtendedFlycam.Inst.QieHuan(Menu.M_全景监控_温度);
CabinetUIManager.ChangeMenu(Menu.M_全景监控_温度); CabinetUIManager.ChangeMenu(Menu.M_全景监控_温度);
isContinue_menu = true;
})); }));
} }
break; break;
@ -234,6 +294,8 @@ public class UIToCabinet : MonoBehaviour
GameManager.Inst.search_box.SetActive(true); GameManager.Inst.search_box.SetActive(true);
ExtendedFlycam.Inst.QieHuan(Menu.M_全景监控_柜门状态); ExtendedFlycam.Inst.QieHuan(Menu.M_全景监控_柜门状态);
CabinetUIManager.ChangeMenu(Menu.M_全景监控_柜门状态); CabinetUIManager.ChangeMenu(Menu.M_全景监控_柜门状态);
isContinue_menu = true;
} }
break; break;
case "Toggle_红外监测": case "Toggle_红外监测":
@ -243,6 +305,8 @@ public class UIToCabinet : MonoBehaviour
GameManager.Inst.search_box.SetActive(false); GameManager.Inst.search_box.SetActive(false);
ExtendedFlycam.Inst.QieHuan(Menu.M_全景监控_红外监测); ExtendedFlycam.Inst.QieHuan(Menu.M_全景监控_红外监测);
CabinetUIManager.ChangeMenu(Menu.M_全景监控_红外监测); CabinetUIManager.ChangeMenu(Menu.M_全景监控_红外监测);
isContinue_menu = true;
} }
break; break;
case "Toggle_现场作业": case "Toggle_现场作业":
@ -257,6 +321,8 @@ public class UIToCabinet : MonoBehaviour
} }
ExtendedFlycam.Inst.QieHuan(Menu.M_全景监控_现场作业); ExtendedFlycam.Inst.QieHuan(Menu.M_全景监控_现场作业);
CabinetUIManager.ChangeMenu(Menu.M_全景监控_现场作业); CabinetUIManager.ChangeMenu(Menu.M_全景监控_现场作业);
isContinue_menu = true;
} }
break; break;
case "Toggle_摄像头": case "Toggle_摄像头":
@ -272,6 +338,8 @@ public class UIToCabinet : MonoBehaviour
{ {
StartCoroutine(clickEventLens[i].TwinkleLens(0.25f)); StartCoroutine(clickEventLens[i].TwinkleLens(0.25f));
} }
isContinue_menu = true;
} }
break; break;
case "Toggle_机柜容量": case "Toggle_机柜容量":
@ -280,9 +348,11 @@ public class UIToCabinet : MonoBehaviour
init(Menu.M_数字孪生_机柜容量); init(Menu.M_数字孪生_机柜容量);
//ExtendedFlycam.Inst.QuanJing(); //ExtendedFlycam.Inst.QuanJing();
GameManager.Inst.search_box.GetComponent<SearchName>().LoadCabinet(SearchName.SearchType.); GameManager.Inst.search_box.GetComponent<SearchName>().LoadCabinet(SearchName.SearchType.);
GameManager.Inst.DisplayCapacity(ison); GameManager.Inst.DisplayCapacity(/*ison*/true);
ExtendedFlycam.Inst.QieHuan(Menu.M_数字孪生_机柜容量); ExtendedFlycam.Inst.QieHuan(Menu.M_数字孪生_机柜容量);
CabinetUIManager.ChangeMenu(Menu.M_数字孪生_机柜容量); CabinetUIManager.ChangeMenu(Menu.M_数字孪生_机柜容量);
isContinue_menu = true;
} }
break; break;
case "Toggle_接地网": case "Toggle_接地网":
@ -292,6 +362,8 @@ public class UIToCabinet : MonoBehaviour
//ExtendedFlycam.Inst.QuanJing(); //ExtendedFlycam.Inst.QuanJing();
ExtendedFlycam.Inst.QieHuan(Menu.M_数字孪生_接地网); ExtendedFlycam.Inst.QieHuan(Menu.M_数字孪生_接地网);
CabinetUIManager.ChangeMenu(Menu.M_数字孪生_接地网); CabinetUIManager.ChangeMenu(Menu.M_数字孪生_接地网);
isContinue_menu = true;
} }
break; break;
case "Toggle_线缆连接": case "Toggle_线缆连接":
@ -302,6 +374,8 @@ public class UIToCabinet : MonoBehaviour
createLine.OnMenuChanged(Menu.M_数字孪生_线缆连接_展示); createLine.OnMenuChanged(Menu.M_数字孪生_线缆连接_展示);
ExtendedFlycam.Inst.QieHuan(Menu.M_数字孪生_线缆连接_展示); ExtendedFlycam.Inst.QieHuan(Menu.M_数字孪生_线缆连接_展示);
CabinetUIManager.ChangeMenu(Menu.M_数字孪生_线缆连接_展示); CabinetUIManager.ChangeMenu(Menu.M_数字孪生_线缆连接_展示);
isContinue_menu = true;
} }
break; break;
case "Toggle_场景管理": case "Toggle_场景管理":
@ -314,10 +388,14 @@ public class UIToCabinet : MonoBehaviour
SN1.hide_menu(); SN1.hide_menu();
ExtendedFlycam.Inst.QieHuan(Menu.M_数字孪生_场景管理); ExtendedFlycam.Inst.QieHuan(Menu.M_数字孪生_场景管理);
CabinetUIManager.ChangeMenu(Menu.M_数字孪生_场景管理); CabinetUIManager.ChangeMenu(Menu.M_数字孪生_场景管理);
isContinue_menu = true;
} }
break; break;
case "Toggle_智能巡检": case "Toggle_智能巡检":
{ {
for (int i = 0; i < second_level_menu.Count; i++)
second_level_menu[i].SetActive(false);
init(Menu.M_数字孪生_智能巡检); init(Menu.M_数字孪生_智能巡检);
//ExtendedFlycam.Inst.QuanJing(); //ExtendedFlycam.Inst.QuanJing();
WebInteraction.Inst.Patrolvideo_open(); WebInteraction.Inst.Patrolvideo_open();
@ -325,18 +403,30 @@ public class UIToCabinet : MonoBehaviour
ExtendedFlycam.Inst.QieHuan(Menu.M_数字孪生_智能巡检); ExtendedFlycam.Inst.QieHuan(Menu.M_数字孪生_智能巡检);
CabinetUIManager.ChangeMenu(Menu.M_数字孪生_智能巡检); CabinetUIManager.ChangeMenu(Menu.M_数字孪生_智能巡检);
ExtendedFlycam.Inst.room = ExtendedFlycam.Room.None; ExtendedFlycam.Inst.room = ExtendedFlycam.Room.None;
isContinue_menu = true;
} }
break; break;
case "Toggle_温度": case "Toggle_温度":
{ {
//if (isCoroutineRunning)
// break;
//isCoroutineRunning = true;
StartCoroutine(Loadinfo(Menu.M_全景监控_温度, (x) => StartCoroutine(Loadinfo(Menu.M_全景监控_温度, (x) =>
{ {
if (string.IsNullOrEmpty(x)) return; //isCoroutineRunning = false;
if (string.IsNullOrEmpty(x))
{
isContinue_menu = true;
return;
}
init(Menu.M_全景监控_温度); init(Menu.M_全景监控_温度);
//ExtendedFlycam.Inst.QuanJing(); //ExtendedFlycam.Inst.QuanJing();
GameManager.Inst.search_box.GetComponent<SearchName>().LoadCabinet(SearchName.SearchType.); GameManager.Inst.search_box.GetComponent<SearchName>().LoadCabinet(SearchName.SearchType.);
ExtendedFlycam.Inst.QieHuan(Menu.M_全景监控_温度); ExtendedFlycam.Inst.QieHuan(Menu.M_全景监控_温度);
CabinetUIManager.ChangeMenu(Menu.M_全景监控_温度); CabinetUIManager.ChangeMenu(Menu.M_全景监控_温度);
isContinue_menu = true;
})); }));
} }
break; break;
@ -347,6 +437,8 @@ public class UIToCabinet : MonoBehaviour
GameManager.Inst.search_box.GetComponent<SearchName>().LoadCabinet(SearchName.SearchType.); GameManager.Inst.search_box.GetComponent<SearchName>().LoadCabinet(SearchName.SearchType.);
ExtendedFlycam.Inst.QieHuan(Menu.M_全景监控_湿度); ExtendedFlycam.Inst.QieHuan(Menu.M_全景监控_湿度);
CabinetUIManager.ChangeMenu(Menu.M_全景监控_湿度); CabinetUIManager.ChangeMenu(Menu.M_全景监控_湿度);
isContinue_menu = true;
} }
break; break;
case "Toggle_烟感": case "Toggle_烟感":
@ -356,6 +448,8 @@ public class UIToCabinet : MonoBehaviour
GameManager.Inst.search_box.GetComponent<SearchName>().LoadCabinet(SearchName.SearchType.); GameManager.Inst.search_box.GetComponent<SearchName>().LoadCabinet(SearchName.SearchType.);
ExtendedFlycam.Inst.QieHuan(Menu.M_全景监控_烟感); ExtendedFlycam.Inst.QieHuan(Menu.M_全景监控_烟感);
CabinetUIManager.ChangeMenu(Menu.M_全景监控_烟感); CabinetUIManager.ChangeMenu(Menu.M_全景监控_烟感);
isContinue_menu = true;
} }
break; break;
case "Toggle_水浸": case "Toggle_水浸":
@ -365,6 +459,8 @@ public class UIToCabinet : MonoBehaviour
GameManager.Inst.search_box.GetComponent<SearchName>().LoadCabinet(SearchName.SearchType.); GameManager.Inst.search_box.GetComponent<SearchName>().LoadCabinet(SearchName.SearchType.);
ExtendedFlycam.Inst.QieHuan(Menu.M_全景监控_水浸); ExtendedFlycam.Inst.QieHuan(Menu.M_全景监控_水浸);
CabinetUIManager.ChangeMenu(Menu.M_全景监控_水浸); CabinetUIManager.ChangeMenu(Menu.M_全景监控_水浸);
isContinue_menu = true;
} }
break; break;
case "Toggle_线缆连接展示": case "Toggle_线缆连接展示":
@ -376,6 +472,8 @@ public class UIToCabinet : MonoBehaviour
createLine.OnMenuChanged(Menu.M_数字孪生_线缆连接_展示); createLine.OnMenuChanged(Menu.M_数字孪生_线缆连接_展示);
ExtendedFlycam.Inst.QieHuan(Menu.M_数字孪生_线缆连接_展示); ExtendedFlycam.Inst.QieHuan(Menu.M_数字孪生_线缆连接_展示);
CabinetUIManager.ChangeMenu(Menu.M_数字孪生_线缆连接_展示); CabinetUIManager.ChangeMenu(Menu.M_数字孪生_线缆连接_展示);
isContinue_menu = true;
} }
break; break;
case "Toggle_线缆连接配置": case "Toggle_线缆连接配置":
@ -385,6 +483,8 @@ public class UIToCabinet : MonoBehaviour
//GameManager.Inst.power_open(); //GameManager.Inst.power_open();
ExtendedFlycam.Inst.QieHuan(Menu.M_数字孪生_线缆连接_配置); ExtendedFlycam.Inst.QieHuan(Menu.M_数字孪生_线缆连接_配置);
CabinetUIManager.ChangeMenu(Menu.M_数字孪生_线缆连接_配置); CabinetUIManager.ChangeMenu(Menu.M_数字孪生_线缆连接_配置);
isContinue_menu = true;
} }
break; break;
case "Toggle_线缆组配置": case "Toggle_线缆组配置":
@ -393,6 +493,8 @@ public class UIToCabinet : MonoBehaviour
SecondConfirmPanel.Instance.panel_object.SetActive(false); SecondConfirmPanel.Instance.panel_object.SetActive(false);
init(Menu.M_数字孪生_线缆组配置); init(Menu.M_数字孪生_线缆组配置);
CabinetUIManager.ChangeMenu(Menu.M_数字孪生_线缆组配置); CabinetUIManager.ChangeMenu(Menu.M_数字孪生_线缆组配置);
isContinue_menu = true;
} }
break; break;
default: default:
@ -468,7 +570,39 @@ public class UIToCabinet : MonoBehaviour
// Update is called once per frame // Update is called once per frame
void Update() void Update()
{ {
if (!isContinue_menu)
{
for (int i = 0; i < WebInteraction.Inst.menu_struct.Count; i++)
{
WebInteraction.Inst.menu_struct[i].toggle.interactable = false;
}
}
else
{
for (int i = 0; i < WebInteraction.Inst.menu_struct.Count; i++)
{
WebInteraction.Inst.menu_struct[i].toggle.interactable = true;
}
}
if (first_level_menu.activeSelf)
{
if (WebInteraction.Inst.menu_struct[10].toggle.isOn)//全景监控
{
second_level_menu[0].SetActive(true);
second_level_menu[2].SetActive(false);
}
else if (WebInteraction.Inst.menu_struct[11].toggle.isOn)//数字孪生
{
second_level_menu[0].SetActive(false);
second_level_menu[2].SetActive(true);
}
else if (WebInteraction.Inst.menu_struct[12].toggle.isOn) //智能巡检
{
second_level_menu[0].SetActive(false);
second_level_menu[2].SetActive(false);
}
}
} }
public void init(Menu menu) public void init(Menu menu)