ソースを参照

【更新】:
1.替换下一步按钮;
2.去掉挑战开始的音频;

youhaitao 2 年 前
コミット
7fc4699d53

+ 18 - 117
assets/main/SceneMain.fire

@@ -81,13 +81,13 @@
     "_active": true,
     "_active": true,
     "_components": [
     "_components": [
       {
       {
-        "__id__": 14
+        "__id__": 12
       },
       },
       {
       {
-        "__id__": 15
+        "__id__": 13
       },
       },
       {
       {
-        "__id__": 16
+        "__id__": 14
       }
       }
     ],
     ],
     "_prefab": null,
     "_prefab": null,
@@ -337,21 +337,17 @@
     "_parent": {
     "_parent": {
       "__id__": 2
       "__id__": 2
     },
     },
-    "_children": [
-      {
-        "__id__": 8
-      }
-    ],
+    "_children": [],
     "_active": false,
     "_active": false,
     "_components": [
     "_components": [
       {
       {
-        "__id__": 10
+        "__id__": 8
       },
       },
       {
       {
-        "__id__": 11
+        "__id__": 9
       },
       },
       {
       {
-        "__id__": 12
+        "__id__": 10
       }
       }
     ],
     ],
     "_prefab": null,
     "_prefab": null,
@@ -359,7 +355,7 @@
     "_color": {
     "_color": {
       "__type__": "cc.Color",
       "__type__": "cc.Color",
       "r": 255,
       "r": 255,
-      "g": 0,
+      "g": 255,
       "b": 255,
       "b": 255,
       "a": 255
       "a": 255
     },
     },
@@ -377,8 +373,8 @@
       "__type__": "TypedArray",
       "__type__": "TypedArray",
       "ctor": "Float64Array",
       "ctor": "Float64Array",
       "array": [
       "array": [
-        910,
-        490,
+        900,
+        480,
         0,
         0,
         0,
         0,
         0,
         0,
@@ -386,7 +382,7 @@
         1,
         1,
         1,
         1,
         1,
         1,
-        1
+        0
       ]
       ]
     },
     },
     "_eulerAngles": {
     "_eulerAngles": {
@@ -402,101 +398,6 @@
     "groupIndex": 0,
     "groupIndex": 0,
     "_id": "5cG5KB0fpMNZKVSQaNJ9wd"
     "_id": "5cG5KB0fpMNZKVSQaNJ9wd"
   },
   },
-  {
-    "__type__": "cc.Node",
-    "_name": "label",
-    "_objFlags": 0,
-    "_parent": {
-      "__id__": 7
-    },
-    "_children": [],
-    "_active": true,
-    "_components": [
-      {
-        "__id__": 9
-      }
-    ],
-    "_prefab": null,
-    "_opacity": 255,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "_contentSize": {
-      "__type__": "cc.Size",
-      "width": 100,
-      "height": 72.32
-    },
-    "_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": "ebeg43vZNKzoNwsfI81U5q"
-  },
-  {
-    "__type__": "cc.Label",
-    "_name": "",
-    "_objFlags": 0,
-    "node": {
-      "__id__": 8
-    },
-    "_enabled": true,
-    "_materials": [
-      {
-        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
-      }
-    ],
-    "_srcBlendFactor": 770,
-    "_dstBlendFactor": 771,
-    "_string": "下一个游戏",
-    "_N$string": "下一个游戏",
-    "_fontSize": 32,
-    "_lineHeight": 32,
-    "_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": 3,
-    "_N$cacheMode": 0,
-    "_id": "09MbeTD1BHRZNkcH70DHDa"
-  },
   {
   {
     "__type__": "cc.Sprite",
     "__type__": "cc.Sprite",
     "_name": "",
     "_name": "",
@@ -510,10 +411,10 @@
         "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
         "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
       }
       }
     ],
     ],
-    "_srcBlendFactor": 770,
+    "_srcBlendFactor": 1,
     "_dstBlendFactor": 771,
     "_dstBlendFactor": 771,
     "_spriteFrame": {
     "_spriteFrame": {
-      "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
+      "__uuid__": "b888a314-aa5f-4d35-afd2-5fb4b49b6e36"
     },
     },
     "_type": 0,
     "_type": 0,
     "_sizeMode": 0,
     "_sizeMode": 0,
@@ -541,8 +442,8 @@
     "_target": null,
     "_target": null,
     "_alignFlags": 33,
     "_alignFlags": 33,
     "_left": 0,
     "_left": 0,
-    "_right": 0,
-    "_top": 0,
+    "_right": 10,
+    "_top": 10,
     "_bottom": 0,
     "_bottom": 0,
     "_verticalCenter": 0,
     "_verticalCenter": 0,
     "_horizontalCenter": 0,
     "_horizontalCenter": 0,
@@ -570,13 +471,13 @@
     "zoomScale": 1.2,
     "zoomScale": 1.2,
     "clickEvents": [
     "clickEvents": [
       {
       {
-        "__id__": 13
+        "__id__": 11
       }
       }
     ],
     ],
     "_N$interactable": true,
     "_N$interactable": true,
     "_N$enableAutoGrayEffect": false,
     "_N$enableAutoGrayEffect": false,
-    "_N$transition": 0,
-    "transition": 0,
+    "_N$transition": 3,
+    "transition": 3,
     "_N$normalColor": {
     "_N$normalColor": {
       "__type__": "cc.Color",
       "__type__": "cc.Color",
       "r": 255,
       "r": 255,

+ 2 - 2
assets/main/SceneMain.ts

@@ -89,7 +89,7 @@ export default class Scene extends cc.Component {
             xhr.setRequestHeader('token', token);
             xhr.setRequestHeader('token', token);
             xhr.onreadystatechange = function () {
             xhr.onreadystatechange = function () {
                 if (xhr.readyState === 4 && (xhr.status >= 200 && xhr.status < 300)) {
                 if (xhr.readyState === 4 && (xhr.status >= 200 && xhr.status < 300)) {
-                    console.log(xhr.responseText);
+                    common.log(xhr.responseText);
                     let json = JSON.parse(xhr.responseText);
                     let json = JSON.parse(xhr.responseText);
                     resolve(json.status == 200);
                     resolve(json.status == 200);
                 }
                 }
@@ -283,7 +283,7 @@ export default class Scene extends cc.Component {
         let curPage = common.getPageNum();
         let curPage = common.getPageNum();
         let attribute: AttributeUnit = common.attributeMap[curUint];
         let attribute: AttributeUnit = common.attributeMap[curUint];
         let length = attribute.config.length;
         let length = attribute.config.length;
-        console.log('curPage: ', curPage, '; length: ', length);
+        common.log('curPage: ', curPage + 1, '; length: ', length);
         if (curPage < length) {
         if (curPage < length) {
             this.addPrefab(curUint, curPage + 1);
             this.addPrefab(curUint, curPage + 1);
         }
         }

BIN
assets/res/common/img/btnNext.png


+ 38 - 0
assets/res/common/img/btnNext.png.meta

@@ -0,0 +1,38 @@
+{
+  "ver": "2.3.7",
+  "uuid": "eaf46ca9-16c0-40f2-9e0d-191a37606c82",
+  "importer": "texture",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": true,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 91,
+  "height": 93,
+  "platformSettings": {},
+  "subMetas": {
+    "btnNext": {
+      "ver": "1.0.6",
+      "uuid": "b888a314-aa5f-4d35-afd2-5fb4b49b6e36",
+      "importer": "sprite-frame",
+      "rawTextureUuid": "eaf46ca9-16c0-40f2-9e0d-191a37606c82",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 91,
+      "height": 93,
+      "rawWidth": 91,
+      "rawHeight": 93,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

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

@@ -47,15 +47,15 @@ export default class LuojigouStart extends cc.Component {
         this.ChallengeType.getComponent(cc.Label).string = props.type;
         this.ChallengeType.getComponent(cc.Label).string = props.type;
         this.ChallengeTitle.getComponent(cc.Label).string = props.title;
         this.ChallengeTitle.getComponent(cc.Label).string = props.title;
 
 
-        if (props.audios && props.audios.length > 0) {
-            Tools.playEffectArr(props.audios, this.closeLJGCard.bind(this));
-        }
-        else {
-            this.scheduleOnce(this.closeLJGCard.bind(this), 4);
-        }
+        // if (props.audios && props.audios.length > 0) {
+        //     Tools.playEffectArr(props.audios, this.closeLJGCard.bind(this));
+        // }
+        // else {
+        this.scheduleOnce(this.closeLJGCard.bind(this), 4);
+        // }
     }
     }
 
 
-    eventClose(){
+    eventClose() {
         this.closeLJGCard();
         this.closeLJGCard();
         AudioManager.getInstance().playEffect('audio/button_touch');
         AudioManager.getInstance().playEffect('audio/button_touch');
     }
     }
@@ -64,7 +64,7 @@ export default class LuojigouStart extends cc.Component {
      * @description 关闭逻辑狗弹窗
      * @description 关闭逻辑狗弹窗
      */
      */
     closeLJGCard() {
     closeLJGCard() {
-        Tools.stopEffects();
+        // Tools.stopEffects();
         this.node.active = false;
         this.node.active = false;
         this.unscheduleAllCallbacks();
         this.unscheduleAllCallbacks();
         NotifierCenter.trigger(CConst.EVENT_GAME_START);
         NotifierCenter.trigger(CConst.EVENT_GAME_START);