From 258234852dd4c5e7c70df9b9fe2a3f91e53d965a Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期四, 20 十一月 2025 15:29:12 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts
---
Main/Component/UI/Common/ButtonClickInterval.cs | 40 ++++++++++++++++++++--------------------
1 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/Main/Component/UI/Common/ButtonClickInterval.cs b/Main/Component/UI/Common/ButtonClickInterval.cs
index f4eb65a..4b44d99 100644
--- a/Main/Component/UI/Common/ButtonClickInterval.cs
+++ b/Main/Component/UI/Common/ButtonClickInterval.cs
@@ -4,25 +4,25 @@
using System.Collections;
- public class ButtonClickInterval : MonoBehaviour
+public class ButtonClickInterval : MonoBehaviour
+{
+ [SerializeField] float interval = 1f;
+ [SerializeField] Button targetBtn;
+
+ private void Awake()
{
- [SerializeField] float interval = 1f;
- [SerializeField] Button targetBtn;
-
- private void Awake()
- {
- targetBtn.AddListener(OnClick);
- }
-
- private void OnClick()
- {
- targetBtn.enabled = false;
- StartCoroutine(DelayClick());
- }
-
- IEnumerator DelayClick()
- {
- yield return new WaitForSeconds(interval);
- targetBtn.enabled = true;
- }
+ targetBtn.AddListener(OnClick);
}
+
+ private void OnClick()
+ {
+ targetBtn.enabled = false;
+ StartCoroutine(DelayClick());
+ }
+
+ IEnumerator DelayClick()
+ {
+ yield return new WaitForSeconds(interval);
+ targetBtn.enabled = true;
+ }
+}
--
Gitblit v1.8.0