From 6fe9c124aefaea2e54520875154dc85e21fed8f1 Mon Sep 17 00:00:00 2001 From: gaoguozheng Date: Wed, 6 Sep 2023 10:03:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=BA=E6=99=AF=E7=AE=A1=E7=90=86=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E5=BC=B9=E5=87=BA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GQ_TongXin/Assets/Scenes/SampleSceneG.unity | 4 ++-- GQ_TongXin/Assets/script/GameManager.cs | 4 ++++ GQ_TongXin/Assets/script/接口/修改/AddDevice.cs | 2 +- GQ_TongXin/Assets/script/接口/修改/RedactDevice.cs | 2 +- GQ_TongXin/Assets/script/点击/ClickEvent.cs | 8 +++++--- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/GQ_TongXin/Assets/Scenes/SampleSceneG.unity b/GQ_TongXin/Assets/Scenes/SampleSceneG.unity index b93c6a80e..460ee03d8 100644 --- a/GQ_TongXin/Assets/Scenes/SampleSceneG.unity +++ b/GQ_TongXin/Assets/Scenes/SampleSceneG.unity @@ -18424,7 +18424,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &184706490 RectTransform: m_ObjectHideFlags: 0 @@ -112376,7 +112376,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} m_Name: m_EditorClassIdentifier: - m_SendPointerHoverToParent: 1 m_HorizontalAxis: Horizontal m_VerticalAxis: Vertical m_SubmitButton: Submit @@ -186979,6 +186978,7 @@ MonoBehaviour: nowDevice: {fileID: 0} lastDeviceID: lastDevice: {fileID: 0} + nowCabine: {fileID: 0} root_AllDevice: code: message: diff --git a/GQ_TongXin/Assets/script/GameManager.cs b/GQ_TongXin/Assets/script/GameManager.cs index b252f36c5..4b3a7fa72 100644 --- a/GQ_TongXin/Assets/script/GameManager.cs +++ b/GQ_TongXin/Assets/script/GameManager.cs @@ -41,6 +41,8 @@ public class GameManager : MonoBehaviour [Header("上一个设备ID")] public string lastDeviceID; [Header("上一个点击设备")] public GameObject lastDevice; + [Header("当前聚焦机柜")] public GameObject nowCabine; + [Header("设备------------------------查询接口")] public DeviceQuery.Root root_AllDevice; ///// @@ -157,6 +159,7 @@ public class GameManager : MonoBehaviour //objectToShow_add.gameObject.SetActive(false); var SN1 = objectToShow_add.GetComponent(); SN1.hide_menu(); + objectToShow_add.SetActive(false); } else { @@ -164,6 +167,7 @@ public class GameManager : MonoBehaviour //objectToShow_add.gameObject.SetActive(false); var SN1 = objectToShow_add.GetComponent(); SN1.hide_menu(); + objectToShow_add.SetActive(false); } } editorMenu.gameObject.SetActive(false); diff --git a/GQ_TongXin/Assets/script/接口/修改/AddDevice.cs b/GQ_TongXin/Assets/script/接口/修改/AddDevice.cs index 976c9f771..7ba64e3c5 100644 --- a/GQ_TongXin/Assets/script/接口/修改/AddDevice.cs +++ b/GQ_TongXin/Assets/script/接口/修改/AddDevice.cs @@ -169,7 +169,7 @@ public class AddDevice : MonoBehaviour { itme.gameObject.SetActive(false); }); - //GameManager.Inst.objectToShow_add.gameObject.SetActive(true); + GameManager.Inst.objectToShow_add.gameObject.SetActive(true); var SN1 = GameManager.Inst.objectToShow_add.GetComponent(); SN1.hide_menu(); } diff --git a/GQ_TongXin/Assets/script/接口/修改/RedactDevice.cs b/GQ_TongXin/Assets/script/接口/修改/RedactDevice.cs index 77a5dfad1..507d55d16 100644 --- a/GQ_TongXin/Assets/script/接口/修改/RedactDevice.cs +++ b/GQ_TongXin/Assets/script/接口/修改/RedactDevice.cs @@ -160,7 +160,7 @@ public class RedactDevice : MonoBehaviour { itme.gameObject.SetActive(false); }); - //GameManager.Inst.objectToShow_add.gameObject.SetActive(true); + GameManager.Inst.objectToShow_add.gameObject.SetActive(true); var SN1 = GameManager.Inst.objectToShow_add.GetComponent(); SN1.hide_menu(); } diff --git a/GQ_TongXin/Assets/script/点击/ClickEvent.cs b/GQ_TongXin/Assets/script/点击/ClickEvent.cs index ce039e97f..1266455c0 100644 --- a/GQ_TongXin/Assets/script/点击/ClickEvent.cs +++ b/GQ_TongXin/Assets/script/点击/ClickEvent.cs @@ -108,7 +108,7 @@ public class ClickEvent : MonoBehaviour GameManager.Inst.search_box.SetActive(false); var d = gameObject.GetComponent(); - + var cabinet = GameManager.Inst.FindParent(gameObject, GameManager.Inst.IsDesiredParent); DragController drag = GameManager.Inst.gameObject.GetComponent().dragController.GetComponent(); if (d) @@ -140,13 +140,15 @@ public class ClickEvent : MonoBehaviour //PatternChoose.Inst.sb_bj_page.SetActive(false);.gameObject.SetActive(true);// } - if (drag) + if (drag && GameManager.Inst.nowCabine == cabinet) { drag.uPosManger = GameManager.Inst.FindParent(gameObject, GameManager.Inst.IsFindParent_UPosManger).GetComponent(); GameManager.Inst.gameObject.GetComponent().uposManger = drag.uPosManger; //drag.oriObjectPrefab = gameObject.GetComponent(); gameObject.GetComponent().OnselfClick(); } + else + GameManager.Inst.editorMenu.gameObject.SetActive(false); } } } @@ -586,6 +588,7 @@ public class ClickEvent : MonoBehaviour /// Ƿͷ public void Change_hide(GameObject cabine, bool isHide, bool isZoomin) { + GameManager.Inst.nowCabine = cabine; if (isZoomin) { if (CabinetUIManager.Instance.cabine_hights_now.Count == 0) @@ -828,5 +831,4 @@ public class ClickEvent : MonoBehaviour }); } - } \ No newline at end of file