From 794f0aa999989a7e285e1812c96a094d14fc3b6c Mon Sep 17 00:00:00 2001 From: huangjiayu <2453663605@qq.com> Date: Sun, 10 Sep 2023 16:29:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E5=85=B7=E9=97=B4=E8=AE=A1=E5=88=86?= =?UTF-8?q?=E5=8F=8A=E5=B7=A5=E5=85=B7=E6=A0=8F=E6=8C=89=E9=92=AE=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=8A=A0=E8=BD=BD=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Script/Tool objects/GameManager_Tools.cs | 28 +++++- .../Assets/Script/UGUI.meta | 8 ++ .../Assets/Script/UGUI/Button_click_count.cs | 86 +++++++++++++++++++ .../Script/UGUI/Button_click_count.cs.meta | 11 +++ 4 files changed, 132 insertions(+), 1 deletion(-) create mode 100644 Electrical_inspectionCompetitionSystem/Assets/Script/UGUI.meta create mode 100644 Electrical_inspectionCompetitionSystem/Assets/Script/UGUI/Button_click_count.cs create mode 100644 Electrical_inspectionCompetitionSystem/Assets/Script/UGUI/Button_click_count.cs.meta diff --git a/Electrical_inspectionCompetitionSystem/Assets/Script/Tool objects/GameManager_Tools.cs b/Electrical_inspectionCompetitionSystem/Assets/Script/Tool objects/GameManager_Tools.cs index 6582bc58..8b96c7f7 100644 --- a/Electrical_inspectionCompetitionSystem/Assets/Script/Tool objects/GameManager_Tools.cs +++ b/Electrical_inspectionCompetitionSystem/Assets/Script/Tool objects/GameManager_Tools.cs @@ -8,9 +8,10 @@ public class GameManager_Tools : MonoBehaviour public GameObject target; //public Button button; public GameObject 工具面板_content; + public List 正确工具; //[HideInInspector] public string toolsname; - + public int 工具选择得分 = 0; // Start is called before the first frame update void Start() { @@ -43,5 +44,30 @@ public class GameManager_Tools : MonoBehaviour 工具按钮.GetComponent().UI_name = toolsname; 工具按钮.GetComponent().change(); + } + public void fenshu_check() { + + + + for (int i = 0; i < 正确工具.Count; i++) + { + for (int g = 0; g < tool_Objects_Base.Count; g++) + { + tool_Objects_Base[g] = 正确工具[i]; + + 工具选择得分 += 1; + } + + + + } + + } + public void ResToolsUI() + { + + + + } } diff --git a/Electrical_inspectionCompetitionSystem/Assets/Script/UGUI.meta b/Electrical_inspectionCompetitionSystem/Assets/Script/UGUI.meta new file mode 100644 index 00000000..3129f498 --- /dev/null +++ b/Electrical_inspectionCompetitionSystem/Assets/Script/UGUI.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b6896e079245ce74ba7705ffdea014cd +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Electrical_inspectionCompetitionSystem/Assets/Script/UGUI/Button_click_count.cs b/Electrical_inspectionCompetitionSystem/Assets/Script/UGUI/Button_click_count.cs new file mode 100644 index 00000000..7c8d3ecf --- /dev/null +++ b/Electrical_inspectionCompetitionSystem/Assets/Script/UGUI/Button_click_count.cs @@ -0,0 +1,86 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; + +using UnityEngine.Events; + +public class Button_click_count : MonoBehaviour +{ + public string[] 关闭物体; + public string[] 开启物体; + + public string[] 触发方法; + + + [SerializeField] + private UnityEvent events; + // Start is called before the first frame update + void Start() + { + GetComponent