lvjincheng пре 4 година
родитељ
комит
d210cfb5c3
1 измењених фајлова са 8 додато и 6 уклоњено
  1. 8 6
      Assets/BowArrow/Scripts/Entry.cs

+ 8 - 6
Assets/BowArrow/Scripts/Entry.cs

@@ -36,15 +36,11 @@ public class Entry : MonoBehaviour
                 //等场景加载完再提示
             } else {
                 SetTip("请安装最新版本软件", Color.yellow);
-                DoTweenUtil.CallDelay(2f, () => {
-                    Application.Quit();
-                });
+                DelayQuit();
             }
         } else {
             SetTip("读取服务端软件版本配置失败", Color.red);
-            DoTweenUtil.CallDelay(2f, () => {
-                Application.Quit();
-            });
+            DelayQuit();
         }
     }
 
@@ -75,4 +71,10 @@ public class Entry : MonoBehaviour
         tipText.text = text;
         tipText.color = color;
     }
+
+    void DelayQuit() {
+        DoTweenUtil.CallDelay(3f, () => {
+            Application.Quit();
+        });
+    }
 }