From 51b0f6ed9f4e1d3bb6f8144470b46908c7699a96 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期一, 11 五月 2026 16:20:37 +0800
Subject: [PATCH] Merge branch 'master' into h5version
---
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..33ece44 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 WaitForSecondsCache.Get(interval);
+ targetBtn.enabled = true;
+ }
+}
--
Gitblit v1.8.0