diff --git a/Electrical_inspectionCompetitionSystem/Assets/Adam/Scenes/UI.unity b/Electrical_inspectionCompetitionSystem/Assets/Adam/Scenes/UI.unity index c93b28ff..d730bb57 100644 --- a/Electrical_inspectionCompetitionSystem/Assets/Adam/Scenes/UI.unity +++ b/Electrical_inspectionCompetitionSystem/Assets/Adam/Scenes/UI.unity @@ -22582,7 +22582,7 @@ RectTransform: m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0.000005722046, y: 0.000015258789} m_SizeDelta: {x: 0, y: -0.000015259} m_Pivot: {x: 0.5, y: 0.5} @@ -98799,7 +98799,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &925169282 RectTransform: m_ObjectHideFlags: 0 @@ -106391,7 +106391,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0.2, g: 0.19607843, b: 0.19607843, a: 1} + m_Color: {r: 0.34117648, g: 0.34117648, b: 0.34117648, a: 0.42745098} m_RaycastTarget: 1 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 @@ -109303,7 +109303,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_SizeDelta: {x: -19, y: 46} m_Pivot: {x: 0, y: 1} --- !u!114 &1021690654 MonoBehaviour: @@ -112174,9 +112174,9 @@ RectTransform: m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_SizeDelta: {x: -2.6999998, y: 0} m_Pivot: {x: 0, y: 1} --- !u!114 &1056303075 MonoBehaviour: @@ -113623,6 +113623,7 @@ MonoBehaviour: m_PersistentCalls: m_Calls: [] recoverBtn: {fileID: 1876085501} + bottomToolToggle: {fileID: 754664720} currentTool: {fileID: 0} --- !u!114 &1067605744 MonoBehaviour: @@ -179676,6 +179677,18 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 0 m_CallState: 2 + - m_Target: {fileID: 754664720} + m_TargetAssemblyTypeName: UnityEngine.UI.Toggle, UnityEngine.UI + m_MethodName: set_isOn + m_Mode: 6 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 --- !u!1 &1708713656 GameObject: m_ObjectHideFlags: 0 @@ -224412,10 +224425,10 @@ RectTransform: m_Father: {fileID: 1021690653} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 84, y: -26} + m_SizeDelta: {x: 40, y: 40} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &5799929949178873663 MonoBehaviour: @@ -224582,10 +224595,10 @@ RectTransform: m_Father: {fileID: 1021690653} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 39, y: -26} + m_SizeDelta: {x: 40, y: 40} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &5799929950087749826 MonoBehaviour: diff --git a/Electrical_inspectionCompetitionSystem/Assets/Adam/Scripts/Components/PermanentToolItem.cs b/Electrical_inspectionCompetitionSystem/Assets/Adam/Scripts/Components/PermanentToolItem.cs index 8dc84fbf..0d25784e 100644 --- a/Electrical_inspectionCompetitionSystem/Assets/Adam/Scripts/Components/PermanentToolItem.cs +++ b/Electrical_inspectionCompetitionSystem/Assets/Adam/Scripts/Components/PermanentToolItem.cs @@ -50,6 +50,7 @@ namespace Components { SetWorkCardPos(); UIManager.Instance.ToolsItemManager.recoverBtn.gameObject.SetActive(true); + UIManager.Instance.ToolsItemManager.bottomToolToggle.interactable = false; } private void SetWorkCardPos() diff --git a/Electrical_inspectionCompetitionSystem/Assets/Adam/Scripts/ToolsItemManager.cs b/Electrical_inspectionCompetitionSystem/Assets/Adam/Scripts/ToolsItemManager.cs index a000be00..af6f7273 100644 --- a/Electrical_inspectionCompetitionSystem/Assets/Adam/Scripts/ToolsItemManager.cs +++ b/Electrical_inspectionCompetitionSystem/Assets/Adam/Scripts/ToolsItemManager.cs @@ -21,7 +21,7 @@ public class ToolsItemManager : MonoSingleton public Button closeBtn; public UnityEvent ItemClick; public Button recoverBtn; - + public Toggle bottomToolToggle; public GameObject currentTool; private void Start() @@ -29,7 +29,7 @@ public class ToolsItemManager : MonoSingleton closeBtn.onClick.AddListener(() => { SwictchToolPanel(false); }); recoverBtn.onClick.AddListener(() => { - SetCurrentInstantiateTool(currentTool); + RecoverCurrentInstantiateTool(currentTool); }); recoverBtn.gameObject.SetActive(false); } @@ -55,6 +55,8 @@ public class ToolsItemManager : MonoSingleton tTemp.selfButton.onClick.AddListener(() => { UIManager.Instance.jobCardController.jobCardPanel.SetActive(true); + SetToggleState(); + }); } else @@ -63,6 +65,8 @@ public class ToolsItemManager : MonoSingleton { ItemClick?.Invoke(tTemp.prefab); recoverBtn.gameObject.SetActive(true); + bottomToolToggle.interactable = false; + SetToggleState(); }); } toolItems.Add(tTemp); @@ -77,10 +81,22 @@ public class ToolsItemManager : MonoSingleton } } - public void SetCurrentInstantiateTool(GameObject tool) + public void SetToggleState() + { + bottomToolToggle.isOn = false; + + SwictchToolPanel(false); + } + + /// + /// + /// + /// + public void RecoverCurrentInstantiateTool(GameObject tool) { if (tool != null) Destroy(tool); + bottomToolToggle.interactable = true; recoverBtn.gameObject.SetActive(false); } diff --git a/Electrical_inspectionCompetitionSystem/Packages/packages-lock.json b/Electrical_inspectionCompetitionSystem/Packages/packages-lock.json index f98f7bdf..0cbeb9db 100644 --- a/Electrical_inspectionCompetitionSystem/Packages/packages-lock.json +++ b/Electrical_inspectionCompetitionSystem/Packages/packages-lock.json @@ -35,12 +35,12 @@ "source": "builtin", "dependencies": { "com.unity.ide.visualstudio": "2.0.16", - "com.unity.ide.rider": "3.0.16", + "com.unity.ide.rider": "3.0.15", "com.unity.ide.vscode": "1.2.5", "com.unity.editorcoroutines": "1.0.0", "com.unity.performance.profile-analyzer": "1.1.1", "com.unity.test-framework": "1.1.31", - "com.unity.testtools.codecoverage": "1.2.2" + "com.unity.testtools.codecoverage": "1.0.1" } }, "com.unity.ide.rider": { @@ -92,7 +92,7 @@ "url": "https://packages.unity.cn" }, "com.unity.services.core": { - "version": "1.6.0", + "version": "1.4.2", "depth": 1, "source": "registry", "dependencies": { @@ -121,7 +121,7 @@ "url": "https://packages.unity.cn" }, "com.unity.testtools.codecoverage": { - "version": "1.2.2", + "version": "1.0.1", "depth": 1, "source": "registry", "dependencies": {