Parcourir la source

开机Logo加之3秒

lvjincheng il y a 3 ans
Parent
commit
746f7bc2a4
1 fichiers modifiés avec 3 ajouts et 1 suppressions
  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() {
     IEnumerator AsyncLoadScene() {
+        timeOnStartLoadScene = Time.realtimeSinceStartup;
         //加载场景名
         //加载场景名
         string sceneName = "Login";
         string sceneName = "Login";
         if (LoginMgr.HasToken()) {
         if (LoginMgr.HasToken()) {
@@ -59,7 +61,7 @@ public class Entry : MonoBehaviour
         async.allowSceneActivation = false;
         async.allowSceneActivation = false;
         while (!async.isDone) {
         while (!async.isDone) {
             if (async.progress >= 0.9f) {
             if (async.progress >= 0.9f) {
-                if (appVersionCheckOK) {
+                if (appVersionCheckOK && Time.realtimeSinceStartup - timeOnStartLoadScene > 3) {
                     async.allowSceneActivation = true;
                     async.allowSceneActivation = true;
                     //SetTip("软件版本校验成功", Color.green);
                     //SetTip("软件版本校验成功", Color.green);
                     break;
                     break;