future il y a 1 an
Parent
commit
03d3cde1c6
2 fichiers modifiés avec 28 ajouts et 24 suppressions
  1. 19 19
      assets/scene/game.scene
  2. 9 5
      assets/script/run/loading_view/loading_view.ts

+ 19 - 19
assets/scene/game.scene

@@ -93,7 +93,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 540,
-      "y": 960,
+      "y": 960.0000000000002,
       "z": 0
     },
     "_lrot": {
@@ -178,7 +178,7 @@
     "_priority": 0,
     "_fov": 45,
     "_fovAxis": 0,
-    "_orthoHeight": 960,
+    "_orthoHeight": 960.0000000000001,
     "_near": 0,
     "_far": 1000,
     "_color": {
@@ -344,7 +344,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920
+      "height": 1920.0000000000002
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -648,7 +648,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920
+      "height": 1920.0000000000002
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -1158,7 +1158,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920
+      "height": 1920.0000000000002
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -2007,7 +2007,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920
+      "height": 1920.0000000000002
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -4178,7 +4178,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920
+      "height": 1920.0000000000002
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -4239,7 +4239,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": -540,
-      "y": -960,
+      "y": -960.0000000000001,
       "z": 0
     },
     "_lrot": {
@@ -4278,7 +4278,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920
+      "height": 1920.0000000000002
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -4801,7 +4801,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": 860,
+      "y": 860.0000000000001,
       "z": 0
     },
     "_lrot": {
@@ -5611,7 +5611,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920
+      "height": 1920.0000000000002
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -5811,7 +5811,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": -540,
-      "y": -960,
+      "y": -960.0000000000001,
       "z": 0
     },
     "_lrot": {
@@ -5850,7 +5850,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920
+      "height": 1920.0000000000002
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -11108,7 +11108,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920
+      "height": 1920.0000000000002
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -15440,7 +15440,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920
+      "height": 1920.0000000000002
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -18189,7 +18189,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920
+      "height": 1920.0000000000002
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -18282,7 +18282,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920
+      "height": 1920.0000000000002
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -18403,7 +18403,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920
+      "height": 1920.0000000000002
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -18518,7 +18518,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920
+      "height": 1920.0000000000002
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",

+ 9 - 5
assets/script/run/loading_view/loading_view.ts

@@ -15,14 +15,17 @@ export class loading_view extends Component {
 
     public startLoading(finish_load_call){
         this.m_finish_load_call = finish_load_call;
-        this.loading_bar.getComponent(ProgressBar).progress = 0;
+        var progress = 0
+        this.loading_bar.getComponent(ProgressBar).progress = progress;
         this.schedule(()=>{
             if(this.m_pause_status){
                 return;
             }
-            this.loading_bar.getComponent(ProgressBar).progress +=0.1;
-            let progress = this.loading_bar.getComponent(ProgressBar).progress
-            this.lab_loading_bar.getComponent(Label).string = `${(progress*100).toFixed()}%`
+            progress +=0.1
+            if(progress<=1) {
+                this.loading_bar.getComponent(ProgressBar).progress = progress - 0.02
+                this.lab_loading_bar.getComponent(Label).string = `${(progress*100).toFixed()}%`
+            }
             switch(progress){
                 case 0.2:
                     this.m_pause_status = true;
@@ -119,7 +122,8 @@ export class loading_view extends Component {
                     })
                 break;
             }
-            if(this.loading_bar.getComponent(ProgressBar).progress>=1){
+
+            if(progress >= 1) {
                 if(this.m_finish_load_call!=null){
                     this.m_finish_load_call()
                 }