From bbd20230cc76b10cd3dd2ade413cbd5032621797 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期三, 05 十一月 2025 11:38:58 +0800
Subject: [PATCH] 0312 功能开启提示调整
---
Main/Utility/GlobalTimeEvent.cs | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/Main/Utility/GlobalTimeEvent.cs b/Main/Utility/GlobalTimeEvent.cs
index 66d9296..9da381a 100644
--- a/Main/Utility/GlobalTimeEvent.cs
+++ b/Main/Utility/GlobalTimeEvent.cs
@@ -5,8 +5,8 @@
public class GlobalTimeEvent : SingletonMonobehaviour<GlobalTimeEvent>
-
{
+ public event Action MS100Event;
public event Action secondEvent;
public event Action fiveSecondEvent;
public event Action minuteEvent;
@@ -16,6 +16,7 @@
public event Action hourEvent;
public event Action halfMinuteEvent;
+ float msBuf = 0f;
int secondBuf = -1;
int fiveSecondBuf = -1;
int minuteBuf = -1;
@@ -32,6 +33,17 @@
private void Update()
{
+ var ms = Time.time;
+ if (ms - msBuf >= 0.1f)
+ {
+ if (MS100Event != null)
+ {
+ MS100Event();
+ }
+ msBuf = ms;
+ }
+
+
var second = DateTime.Now.Second;
if (second != secondBuf)
{
--
Gitblit v1.8.0