From 970b855cbcb3098e355bff473d510eb1fcd34c62 Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期一, 15 十月 2018 14:12:41 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
Utility/GlobalTimeEvent.cs | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/Utility/GlobalTimeEvent.cs b/Utility/GlobalTimeEvent.cs
index b1699c7..1266d35 100644
--- a/Utility/GlobalTimeEvent.cs
+++ b/Utility/GlobalTimeEvent.cs
@@ -11,6 +11,7 @@
public event Action tenMinuteEvent;
public event Action halfHourEvent;
public event Action hourEvent;
+ public event Action halfMinuteEvent;
int secondBuf = -1;
int minuteBuf = -1;
@@ -18,6 +19,7 @@
int tenMinuteBuf = -1;
int halfHourBuf = -1;
int hourBuf = -1;
+ int halfMinuteBuf = -1;
public void Begin()
{
@@ -57,6 +59,26 @@
}
}
+ var thirtySeconds = second / 30;
+ if (halfMinuteBuf != thirtySeconds)
+ {
+ try
+ {
+ if (halfMinuteEvent != null)
+ {
+ halfMinuteEvent();
+ }
+ }
+ catch (Exception ex)
+ {
+ Debug.LogException(ex);
+ }
+ finally
+ {
+ halfMinuteBuf = thirtySeconds;
+ }
+ }
+
var fiveMinute = minute / 5;
if (fiveMinuteBuf != fiveMinute)
{
--
Gitblit v1.8.0