Browse Source

修复TimeExpire计时器会晚一帧才计时到达的问题

大爷 1 year ago
parent
commit
048faf5f68
1 changed files with 1 additions and 5 deletions
  1. 1 5
      Common/CommonLang/Timing.cs

+ 1 - 5
Common/CommonLang/Timing.cs

@@ -174,12 +174,8 @@ namespace CommonLang
         /// <returns>是否到期</returns>
         public bool Update(int intervalMS)
         {
-            if (mPassTimeMS >= mTotalTimeMS)
-            {
-                return true;
-            }
             this.mPassTimeMS += intervalMS;
-            return false;
+            return mPassTimeMS >= mTotalTimeMS;
         }
 
         /// <summary>