فهرست منبع

修复离线挂机bug

lzx 2 هفته پیش
والد
کامیت
59be9277c3
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      Assets/Scripts/GameUI/GameApplctionMono.cs

+ 1 - 1
Assets/Scripts/GameUI/GameApplctionMono.cs

@@ -63,7 +63,7 @@ namespace GameUI
 
         private void OnApplicationFocus(bool hasFocus)
         {
-            if (hasFocus && PlayerManager.Instance.isLogin)
+            if (!hasFocus && PlayerManager.Instance.isLogin)
             {
                 // 退出时记录时间
                 AccountFileInfo.Instance.playerData.ExitTime = TimeHelper.ClientNow();