hch
5 天以前 bbd20230cc76b10cd3dd2ade413cbd5032621797
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)
        {