Browse Source

开机Logo加之3秒

lvjincheng 3 years ago
parent
commit
746f7bc2a4
1 changed files with 3 additions and 1 deletions
  1. 3 1
      Assets/BowArrow/Scripts/Entry.cs

+ 3 - 1
Assets/BowArrow/Scripts/Entry.cs

@@ -47,7 +47,9 @@ public class Entry : MonoBehaviour
         }
     }
 
+    float timeOnStartLoadScene;
     IEnumerator AsyncLoadScene() {
+        timeOnStartLoadScene = Time.realtimeSinceStartup;
         //加载场景名
         string sceneName = "Login";
         if (LoginMgr.HasToken()) {
@@ -59,7 +61,7 @@ public class Entry : MonoBehaviour
         async.allowSceneActivation = false;
         while (!async.isDone) {
             if (async.progress >= 0.9f) {
-                if (appVersionCheckOK) {
+                if (appVersionCheckOK && Time.realtimeSinceStartup - timeOnStartLoadScene > 3) {
                     async.allowSceneActivation = true;
                     //SetTip("软件版本校验成功", Color.green);
                     break;