Bladeren bron

【更新】 测试代码更新;

youhaitao 2 jaren geleden
bovenliggende
commit
763b0da192

+ 1 - 1
README.md

@@ -28,7 +28,7 @@
 
 测试配置:
     assets/src/common/common.ts
-        isDebug: boolean = true;// 是否开启测试
+        debugTpye: number = 1;// 模式测试 0:非测试 1:本地测试 2:外网测试
         unitCur: number = 6;// 第几集,从1开始
         pageCur: number = 4;// 第几个游戏,从1开始
     上面的描述:测试状态,从第六集第四个游戏开始测试。

+ 6 - 6
assets/main/SceneMain.ts

@@ -73,7 +73,7 @@ export default class Scene extends cc.Component {
         this.initUI();
         await this.initData();
         common.log("场景加载完成,等待进入游戏层");
-        if (common.isDebug) {
+        if (common.debugTpye == 1) {
             this.nodePageMap.active = false;
             this.addPrefab(common.getUnitNum(), common.getPageNum());
         }
@@ -158,7 +158,7 @@ export default class Scene extends cc.Component {
 
         this.nodeShow = cc.instantiate(prefab);
         this.node.addChild(this.nodeShow, CConst.ZORDER_GAME);
-        this.node.getChildByName('bg').active = true;
+        this.node.getChildByName('bg').active = false;
         
         this.resetBtnNext(true);
     }
@@ -179,15 +179,15 @@ export default class Scene extends cc.Component {
     }
 
     resetBtnNext(show) {
-        if (common.isDebug) {
-            this.btnNext.active = true;
-        }
-        else{
+        if (common.debugTpye == 0) {
             this.btnNext.active = false;// 显示下一步按钮
             if (!show) return;
             let gameOne = common.getGameFormLocal();
             this.btnNext.active = Number(gameOne) >= 0;
         }
+        else{
+            this.btnNext.active = true;
+        }
     }
 
     /**

+ 1 - 1
assets/res/luojigouStart/src/LuojigouStart.ts

@@ -51,7 +51,7 @@ export default class LuojigouStart extends cc.Component {
         //     Tools.playEffectArr(props.audios, this.closeLJGCard.bind(this));
         // }
         // else {
-        this.scheduleOnce(this.closeLJGCard.bind(this), 4);
+        this.scheduleOnce(this.closeLJGCard.bind(this), 2);
         // }
     }
 

+ 136 - 25
assets/res/pageMap/res/prefab/pageMap.prefab

@@ -27,14 +27,14 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 70
+        "__id__": 73
       },
       {
-        "__id__": 71
+        "__id__": 74
       }
     ],
     "_prefab": {
-      "__id__": 72
+      "__id__": 75
     },
     "_opacity": 255,
     "_color": {
@@ -235,19 +235,19 @@
         "__id__": 50
       },
       {
-        "__id__": 57
+        "__id__": 60
       },
       {
-        "__id__": 61
+        "__id__": 64
       },
       {
-        "__id__": 65
+        "__id__": 68
       }
     ],
     "_active": true,
     "_components": [],
     "_prefab": {
-      "__id__": 69
+      "__id__": 72
     },
     "_opacity": 255,
     "_color": {
@@ -2033,16 +2033,19 @@
     "_children": [
       {
         "__id__": 51
+      },
+      {
+        "__id__": 54
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 54
+        "__id__": 57
       }
     ],
     "_prefab": {
-      "__id__": 56
+      "__id__": 59
     },
     "_opacity": 255,
     "_color": {
@@ -2198,6 +2201,114 @@
     "fileId": "09alroSbtLBpfFoAK5nkjW",
     "sync": false
   },
+  {
+    "__type__": "cc.Node",
+    "_name": "label",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 50
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 55
+      }
+    ],
+    "_prefab": {
+      "__id__": 56
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 66.74,
+      "height": 75.6
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 54
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_string": "12",
+    "_N$string": "12",
+    "_fontSize": 60,
+    "_lineHeight": 60,
+    "_enableWrapText": true,
+    "_N$file": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_styleFlags": 0,
+    "_underlineHeight": 0,
+    "_N$horizontalAlign": 1,
+    "_N$verticalAlign": 1,
+    "_N$fontFamily": "Arial",
+    "_N$overflow": 0,
+    "_N$cacheMode": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "c94c2fd2-3c89-4b40-bf3d-3019e190b645"
+    },
+    "fileId": "373e02SJtKfZtCh8Ei1U/w",
+    "sync": false
+  },
   {
     "__type__": "cc.Button",
     "_name": "",
@@ -2212,7 +2323,7 @@
     "zoomScale": 1.2,
     "clickEvents": [
       {
-        "__id__": 55
+        "__id__": 58
       }
     ],
     "_N$interactable": true,
@@ -2302,11 +2413,11 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 58
+        "__id__": 61
       }
     ],
     "_prefab": {
-      "__id__": 60
+      "__id__": 63
     },
     "_opacity": 255,
     "_color": {
@@ -2360,7 +2471,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 57
+      "__id__": 60
     },
     "_enabled": true,
     "_normalMaterial": null,
@@ -2369,7 +2480,7 @@
     "zoomScale": 1.2,
     "clickEvents": [
       {
-        "__id__": 59
+        "__id__": 62
       }
     ],
     "_N$interactable": true,
@@ -2459,11 +2570,11 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 62
+        "__id__": 65
       }
     ],
     "_prefab": {
-      "__id__": 64
+      "__id__": 67
     },
     "_opacity": 255,
     "_color": {
@@ -2517,7 +2628,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 61
+      "__id__": 64
     },
     "_enabled": true,
     "_normalMaterial": null,
@@ -2526,7 +2637,7 @@
     "zoomScale": 1.2,
     "clickEvents": [
       {
-        "__id__": 63
+        "__id__": 66
       }
     ],
     "_N$interactable": true,
@@ -2616,11 +2727,11 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 66
+        "__id__": 69
       }
     ],
     "_prefab": {
-      "__id__": 68
+      "__id__": 71
     },
     "_opacity": 255,
     "_color": {
@@ -2674,7 +2785,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 65
+      "__id__": 68
     },
     "_enabled": true,
     "_normalMaterial": null,
@@ -2683,7 +2794,7 @@
     "zoomScale": 1.2,
     "clickEvents": [
       {
-        "__id__": 67
+        "__id__": 70
       }
     ],
     "_N$interactable": true,
@@ -2822,13 +2933,13 @@
         "__id__": 50
       },
       {
-        "__id__": 57
+        "__id__": 60
       },
       {
-        "__id__": 61
+        "__id__": 64
       },
       {
-        "__id__": 65
+        "__id__": 68
       }
     ],
     "_id": ""

+ 5 - 5
assets/src/common/common.ts

@@ -36,13 +36,13 @@ class common {
         this._instance.editSpineRun();
         return this._instance;
     };
-
-    isDebug: boolean = true;
+    /** 模式测试 0:非测试 1:本地测试 2:外网测试 */
+    debugTpye: number = 2;
     project: string = "luojigou_model";
     itemId: string = '';
-    unitCur: number = 12;// 第几集,从1开始
-    pageCur: number = 1;// 第几个游戏,从1开始
-    isCanPlayVideo = false;
+    unitCur: number = 15;// 第几集,从1开始
+    pageCur: number = 8;// 第几个游戏,从1开始
+    isCanPlayVideo: boolean = false;
     attributeMap: any = {};// 内部形式为 { "0" : AttributeUtil }
     urlToken: string = 'https://open.api.luojigou.vip/mall/mobile/common/verify/token';// 验证token的地址;
     urlOver: string = 'https://open.api.luojigou.vip/app/app/gameCourse/record/12321312';// 当前集游戏完结,上报地址;