From a972605e1cf8122330de5b6ff53857be130972be Mon Sep 17 00:00:00 2001
From: Spring774 <337905794@qq.com>
Date: Thu, 30 Oct 2025 11:59:53 +0800
Subject: [PATCH] 添加华为广告,界面还需要去除不需要华为的地方

---
 assets/Script/Global.ts |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/assets/Script/Global.ts b/assets/Script/Global.ts
index ef430f6..1304a48 100644
--- a/assets/Script/Global.ts
+++ b/assets/Script/Global.ts
@@ -163,4 +163,20 @@
         });
     }
 
+    private static debounceStates: { [key: string]: boolean } = {};
+    private static debounceTimer: { [key: string]: number } = {};
+    //防快速点击函数
+    static debounceClicks = (callback: () => void, identifier = 'default', delay = 1000) => {
+        return () => {
+            if (!Global.debounceStates[identifier]) {
+                Global.debounceStates[identifier] = true;
+                Global.debounceTimer[identifier] = setTimeout(() => {
+                    Global.debounceStates[identifier] = false;
+                    clearTimeout(Global.debounceTimer[identifier]);
+                }, delay);
+                callback();
+            }
+        };
+    };
+
 }

--
Gitblit v1.9.1