diff --git a/Assets/LongZhiMeng/Prefab/ShiNei/nei-2.prefab b/Assets/LongZhiMeng/Prefab/ShiNei/nei-2.prefab index 6c69842..41e4503 100644 --- a/Assets/LongZhiMeng/Prefab/ShiNei/nei-2.prefab +++ b/Assets/LongZhiMeng/Prefab/ShiNei/nei-2.prefab @@ -3839,7 +3839,6 @@ GameObject: - component: {fileID: 4031327086866037239} - component: {fileID: 7077182373080507910} - component: {fileID: 648309727317344874} - - component: {fileID: 5316555523566629554} m_Layer: 9 m_Name: BF_Beng4 m_TagString: Untagged @@ -4077,19 +4076,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8fdf5db6d3c50854e820a4c31d098346, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!114 &5316555523566629554 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2326997429451289726} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 740b18542139ee9469c8e41c0175ef99, type: 3} - m_Name: - m_EditorClassIdentifier: - BindType: 1 --- !u!1 &2353157914987251643 GameObject: m_ObjectHideFlags: 0 @@ -5572,7 +5558,6 @@ GameObject: - component: {fileID: 5287985838862105051} - component: {fileID: 3886733085689299053} - component: {fileID: 5900376028175799930} - - component: {fileID: 5956888857602140127} m_Layer: 9 m_Name: BF_Beng6 m_TagString: Untagged @@ -5810,19 +5795,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8fdf5db6d3c50854e820a4c31d098346, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!114 &5956888857602140127 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3042978852869849127} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 740b18542139ee9469c8e41c0175ef99, type: 3} - m_Name: - m_EditorClassIdentifier: - BindType: 1 --- !u!1 &3074018658521419042 GameObject: m_ObjectHideFlags: 0 @@ -5839,7 +5811,6 @@ GameObject: - component: {fileID: 2559636814166329965} - component: {fileID: 3185391126076523883} - component: {fileID: 2464205267263184235} - - component: {fileID: 1268469069279118851} m_Layer: 9 m_Name: BF_Beng5 m_TagString: Untagged @@ -6077,19 +6048,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8fdf5db6d3c50854e820a4c31d098346, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!114 &1268469069279118851 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3074018658521419042} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 740b18542139ee9469c8e41c0175ef99, type: 3} - m_Name: - m_EditorClassIdentifier: - BindType: 1 --- !u!1 &3079525204607243430 GameObject: m_ObjectHideFlags: 0 @@ -7264,7 +7222,6 @@ GameObject: - component: {fileID: 4937732800351621372} - component: {fileID: 3706227644191310831} - component: {fileID: 1909279315814935535} - - component: {fileID: 5073485994584401826} m_Layer: 9 m_Name: BF_Beng3 m_TagString: Untagged @@ -7502,19 +7459,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8fdf5db6d3c50854e820a4c31d098346, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!114 &5073485994584401826 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3786473117089836571} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 740b18542139ee9469c8e41c0175ef99, type: 3} - m_Name: - m_EditorClassIdentifier: - BindType: 1 --- !u!1 &3788032133742242516 GameObject: m_ObjectHideFlags: 0 @@ -10779,7 +10723,6 @@ GameObject: - component: {fileID: 4131269442587860886} - component: {fileID: 3729722111198336993} - component: {fileID: 6673500913827426579} - - component: {fileID: 4716404738186179804} m_Layer: 9 m_Name: BF_Beng0 m_TagString: Untagged @@ -11017,19 +10960,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8fdf5db6d3c50854e820a4c31d098346, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!114 &4716404738186179804 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5594357906926426870} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 740b18542139ee9469c8e41c0175ef99, type: 3} - m_Name: - m_EditorClassIdentifier: - BindType: 1 --- !u!1 &5627440744978564017 GameObject: m_ObjectHideFlags: 0 @@ -12235,7 +12165,6 @@ GameObject: - component: {fileID: 6359272789119930557} - component: {fileID: 5498266817984549803} - component: {fileID: 7760720744530228053} - - component: {fileID: 260300424443423364} m_Layer: 9 m_Name: BF_Beng1 m_TagString: Untagged @@ -12473,19 +12402,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8fdf5db6d3c50854e820a4c31d098346, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!114 &260300424443423364 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6200839019434489611} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 740b18542139ee9469c8e41c0175ef99, type: 3} - m_Name: - m_EditorClassIdentifier: - BindType: 1 --- !u!1 &6220262723648622183 GameObject: m_ObjectHideFlags: 0 @@ -17354,7 +17270,6 @@ GameObject: - component: {fileID: 7044227335787967364} - component: {fileID: 492251404278482733} - component: {fileID: 4466559575882566828} - - component: {fileID: 2741434232488103668} m_Layer: 9 m_Name: BF_Beng7 m_TagString: Untagged @@ -17592,19 +17507,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8fdf5db6d3c50854e820a4c31d098346, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!114 &2741434232488103668 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8489328720269340209} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 740b18542139ee9469c8e41c0175ef99, type: 3} - m_Name: - m_EditorClassIdentifier: - BindType: 1 --- !u!1 &8503116314495135405 GameObject: m_ObjectHideFlags: 0 @@ -17881,7 +17783,6 @@ GameObject: - component: {fileID: 9122696232950967575} - component: {fileID: 3920252984869914113} - component: {fileID: 7818056208332781246} - - component: {fileID: 4325888694603943696} m_Layer: 9 m_Name: BF_Beng2 m_TagString: Untagged @@ -18119,19 +18020,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8fdf5db6d3c50854e820a4c31d098346, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!114 &4325888694603943696 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8711429766819222879} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 740b18542139ee9469c8e41c0175ef99, type: 3} - m_Name: - m_EditorClassIdentifier: - BindType: 1 --- !u!1 &8781817313093410746 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/ANet/DeviceBind.cs b/Assets/Scripts/ANet/DeviceBind.cs index 73cc4ba..aa1f4e3 100644 --- a/Assets/Scripts/ANet/DeviceBind.cs +++ b/Assets/Scripts/ANet/DeviceBind.cs @@ -11,7 +11,13 @@ public class DeviceBind : MonoBehaviour public GameObject BindePrefab; public Text Title; public Button CloseBtn; - + private void OnDisable() + { + if (DeviceInfo.Instance.gameObject.activeSelf) + { + DeviceInfo.Instance.gameObject.SetActive(false); + } + } public void DataBind(DeviceType bindType, List binddata, string bindobjname = null) { Title.text = bindType.ToString() + "列表"; @@ -29,24 +35,25 @@ public class DeviceBind : MonoBehaviour { GameObject go = Instantiate(BindePrefab, BindParent); Color showColor = Color.white; - foreach (var de in DevicePanelManager.Instance.BindObjectList) - { - if (!string.IsNullOrEmpty(de.ObjName)) - { - if (de.DeviceId == item.deviceNo) - { - if (de.ObjName == bindobjname) - { - showColor = Color.red; - } - else - { - showColor = Color.yellow; - } - break; - } - } - } + //颜色设置 + //foreach (var de in DevicePanelManager.Instance.BindObjectList) + //{ + // if (!string.IsNullOrEmpty(de.ObjName)) + // { + // if (de.DeviceId == item.deviceNo) + // { + // if (de.ObjName == bindobjname) + // { + // showColor = Color.red; + // } + // else + // { + // showColor = Color.yellow; + // } + // break; + // } + // } + //} go.GetComponent().DataBind(item, showColor); } if (binddata.Count == 0) diff --git a/Assets/Scripts/ANet/DeviceItem.cs b/Assets/Scripts/ANet/DeviceItem.cs index 4f1c564..ae09c0d 100644 --- a/Assets/Scripts/ANet/DeviceItem.cs +++ b/Assets/Scripts/ANet/DeviceItem.cs @@ -17,7 +17,20 @@ public class DeviceItem : MonoBehaviour LocalBtn.onClick.AddListener(LocalBtn_Click); ViewBtn.onClick.AddListener(ViewBtn_Click); } - + private void Update() + { + if (Input.GetKey(KeyCode.Q)) + { + if (Input.GetKeyDown(KeyCode.O)) + { + LocalBtn.gameObject.SetActive(true); + } + if (Input.GetKeyDown(KeyCode.H)) + { + LocalBtn.gameObject.SetActive(false); + } + } + } public void DataBind(DeviceList bindData, Color showColor) { BindData = bindData; diff --git a/Assets/Scripts/ANet/DeviceObj.cs b/Assets/Scripts/ANet/DeviceObj.cs index 4d5592b..473093c 100644 --- a/Assets/Scripts/ANet/DeviceObj.cs +++ b/Assets/Scripts/ANet/DeviceObj.cs @@ -17,17 +17,20 @@ public class DeviceObj : MonoBehaviour public int floorId = 0; void Start() { - MessageDispatcher.AddListener("DeviceMenuChanged", DeviceMenuChanged, "Floor"); - MessageDispatcher.AddListener("FLOORNUMBER", FloorChanged); + MessageDispatcher.AddListener("DeviceMenuChanged", DeviceMenuChanged); + MessageDispatcher.AddListener("FLOORNUMBER", FloorChanged, "Floor"); } private void FloorChanged(IMessage obj) { - //int number = (int)obj.Data; - //isShow = number == floorId ? true : false; - //if (tIconObj) - // tIconObj.gameObject.SetActive(isShow); - //gameObject.GetComponent().enabled = isShow; + if (DevicePanelManager.Instance.MenuType == BindType) + { + int number = (int)obj.Data; + isShow = number == floorId ? true : false; + if (tIconObj) + tIconObj.gameObject.SetActive(isShow); + gameObject.GetComponent().enabled = isShow; + } } private void DeviceMenuChanged(IMessage obj) diff --git a/Assets/Scripts/ANet/DevicePanelManager.cs b/Assets/Scripts/ANet/DevicePanelManager.cs index 88d8dcf..71e4c61 100644 --- a/Assets/Scripts/ANet/DevicePanelManager.cs +++ b/Assets/Scripts/ANet/DevicePanelManager.cs @@ -38,6 +38,15 @@ public class diveceSourceData public string sign; public long timestamp; } +public class diveceAlarmData +{ + public int currentPage; + public int pageSize; + public long buildingId; + public string type;//fire fault type事件类型(fire=火警, fault=故障) + public string sign; + public long timestamp; +} [Serializable] public class PageInfoList { @@ -161,6 +170,40 @@ public class DeviceList public string zone { get; set; } } +[Serializable] +public class TotaDivecelAlarmInfo +{ + /// + /// 状态码 + /// + public int? code { get; set; } + /// + /// 数据 + /// + public PageInfoList data { get; set; } + /// + /// 消息 + /// + public string message { get; set; } +} +[Serializable] +public class DeviceAlarmList +{ + public string alarmTime; + public string createTime; + public string descript; + public string deviceName; + public string deviceNo; + public int deviceType; + public string deviceTypeName; + public string handleAlarmTime; + public string handlePeople; + public string handlePhone; + public string id; + public string modifyTime; + public int state; + public int status; +} #pragma warning restore IDE1006 // 命名样式 #endregion //diviceid(136-用户信息传输装置, 258-消防水泵状态, 401-消防水箱水位, diff --git a/Assets/Scripts/ANet/Prefabs/DeviceItem.prefab b/Assets/Scripts/ANet/Prefabs/DeviceItem.prefab index fc796ff..85ec404 100644 --- a/Assets/Scripts/ANet/Prefabs/DeviceItem.prefab +++ b/Assets/Scripts/ANet/Prefabs/DeviceItem.prefab @@ -211,7 +211,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &8174696344364112589 RectTransform: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/ANet/Prefabs/Devices.prefab b/Assets/Scripts/ANet/Prefabs/Devices.prefab index adb4837..abd978d 100644 --- a/Assets/Scripts/ANet/Prefabs/Devices.prefab +++ b/Assets/Scripts/ANet/Prefabs/Devices.prefab @@ -1291,7 +1291,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &5818544122222674868 RectTransform: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/ANet/Prefabs/Point.prefab b/Assets/Scripts/ANet/Prefabs/Point.prefab index d604158..45d8566 100644 --- a/Assets/Scripts/ANet/Prefabs/Point.prefab +++ b/Assets/Scripts/ANet/Prefabs/Point.prefab @@ -29,7 +29,7 @@ Transform: m_GameObject: {fileID: 3051062197270240133} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 @@ -111,3 +111,4 @@ MonoBehaviour: tIcon: {fileID: 2165570965609724972, guid: 85a6b279122fde645be21030eae0c2b4, type: 3} tIconObj: {fileID: 0} isShow: 0 + floorId: 0