浏览代码

修复离线挂机bug

lzx 1 天之前
父节点
当前提交
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();