Bladeren bron

【BUG】修改新手引导报错问题

mojunshou 7 maanden geleden
bovenliggende
commit
569dc3d8b1

+ 14 - 14
assets/bundle/gui/eliminate/eliminate.prefab

@@ -7279,7 +7279,7 @@
   {
     "__type__": "cc.Node",
     "_name": "Bottom",
-    "_objFlags": 512,
+    "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 10
@@ -7348,7 +7348,7 @@
   {
     "__type__": "cc.Node",
     "_name": "Sprite",
-    "_objFlags": 512,
+    "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 297
@@ -7446,12 +7446,12 @@
       "a": 255
     },
     "_spriteFrame": {
-      "__uuid__": "87eed207-974c-43b0-b9cc-c2aa1103ed41@f9941",
+      "__uuid__": "1995da1c-7816-4888-8264-8887dcd03b29@f9941",
       "__expectedType__": "cc.SpriteFrame"
     },
     "_type": 1,
     "_fillType": 0,
-    "_sizeMode": 0,
+    "_sizeMode": 2,
     "_fillCenter": {
       "__type__": "cc.Vec2",
       "x": 0,
@@ -7484,7 +7484,7 @@
   {
     "__type__": "cc.Node",
     "_name": "main_bottom",
-    "_objFlags": 512,
+    "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 297
@@ -7659,7 +7659,7 @@
   {
     "__type__": "cc.Node",
     "_name": "bricksNode",
-    "_objFlags": 512,
+    "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 297
@@ -7747,7 +7747,7 @@
   {
     "__type__": "cc.Node",
     "_name": "btn_auto",
-    "_objFlags": 512,
+    "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 297
@@ -7807,7 +7807,7 @@
   {
     "__type__": "cc.Node",
     "_name": "off",
-    "_objFlags": 512,
+    "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 316
@@ -7943,7 +7943,7 @@
   {
     "__type__": "cc.Node",
     "_name": "on",
-    "_objFlags": 512,
+    "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 316
@@ -8234,7 +8234,7 @@
   {
     "__type__": "cc.Node",
     "_name": "btn_double",
-    "_objFlags": 512,
+    "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 297
@@ -8294,7 +8294,7 @@
   {
     "__type__": "cc.Node",
     "_name": "Sprite",
-    "_objFlags": 512,
+    "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 337
@@ -8430,7 +8430,7 @@
   {
     "__type__": "cc.Node",
     "_name": "lab_time",
-    "_objFlags": 512,
+    "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 337
@@ -8730,7 +8730,7 @@
   {
     "__type__": "cc.Node",
     "_name": "btn_text",
-    "_objFlags": 512,
+    "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 297
@@ -8787,7 +8787,7 @@
   {
     "__type__": "cc.Node",
     "_name": "Label",
-    "_objFlags": 512,
+    "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 357

File diff suppressed because it is too large
+ 873 - 137
assets/bundle/gui/eliminate/prefab/withdrawalRecord.prefab


BIN
assets/bundle/gui/eliminate/texture/brick_bg.png


+ 32 - 32
assets/bundle/gui/eliminate/texture/brick_bg.png.meta

@@ -2,7 +2,7 @@
   "ver": "1.0.27",
   "importer": "image",
   "imported": true,
-  "uuid": "87eed207-974c-43b0-b9cc-c2aa1103ed41",
+  "uuid": "1995da1c-7816-4888-8264-8887dcd03b29",
   "files": [
     ".json",
     ".png"
@@ -10,14 +10,14 @@
   "subMetas": {
     "6c48a": {
       "importer": "texture",
-      "uuid": "87eed207-974c-43b0-b9cc-c2aa1103ed41@6c48a",
+      "uuid": "1995da1c-7816-4888-8264-8887dcd03b29@6c48a",
       "displayName": "brick_bg",
       "id": "6c48a",
       "name": "texture",
       "userData": {
         "wrapModeS": "clamp-to-edge",
         "wrapModeT": "clamp-to-edge",
-        "imageUuidOrDatabaseUri": "87eed207-974c-43b0-b9cc-c2aa1103ed41",
+        "imageUuidOrDatabaseUri": "1995da1c-7816-4888-8264-8887dcd03b29",
         "isUuid": true,
         "visible": false,
         "minfilter": "linear",
@@ -34,26 +34,25 @@
     },
     "f9941": {
       "importer": "sprite-frame",
-      "uuid": "87eed207-974c-43b0-b9cc-c2aa1103ed41@f9941",
+      "uuid": "1995da1c-7816-4888-8264-8887dcd03b29@f9941",
       "displayName": "brick_bg",
       "id": "f9941",
       "name": "spriteFrame",
       "userData": {
-        "trimType": "auto",
         "trimThreshold": 1,
         "rotated": false,
         "offsetX": 0,
         "offsetY": 0,
         "trimX": 0,
         "trimY": 0,
-        "width": 168,
-        "height": 53,
-        "rawWidth": 168,
-        "rawHeight": 53,
-        "borderTop": 14,
-        "borderBottom": 15,
-        "borderLeft": 24,
-        "borderRight": 32,
+        "width": 672,
+        "height": 210,
+        "rawWidth": 672,
+        "rawHeight": 210,
+        "borderTop": 0,
+        "borderBottom": 0,
+        "borderLeft": 0,
+        "borderRight": 0,
         "packable": true,
         "pixelsToUnit": 100,
         "pivotX": 0.5,
@@ -61,17 +60,17 @@
         "meshType": 0,
         "vertices": {
           "rawPosition": [
-            -84,
-            -26.5,
+            -336,
+            -105,
             0,
-            84,
-            -26.5,
+            336,
+            -105,
             0,
-            -84,
-            26.5,
+            -336,
+            105,
             0,
-            84,
-            26.5,
+            336,
+            105,
             0
           ],
           "indexes": [
@@ -84,12 +83,12 @@
           ],
           "uv": [
             0,
-            53,
-            168,
-            53,
+            210,
+            672,
+            210,
             0,
             0,
-            168,
+            672,
             0
           ],
           "nuv": [
@@ -103,19 +102,20 @@
             1
           ],
           "minPos": [
-            -84,
-            -26.5,
+            -336,
+            -105,
             0
           ],
           "maxPos": [
-            84,
-            26.5,
+            336,
+            105,
             0
           ]
         },
         "isUuid": true,
-        "imageUuidOrDatabaseUri": "87eed207-974c-43b0-b9cc-c2aa1103ed41@6c48a",
-        "atlasUuid": ""
+        "imageUuidOrDatabaseUri": "1995da1c-7816-4888-8264-8887dcd03b29@6c48a",
+        "atlasUuid": "",
+        "trimType": "auto"
       },
       "ver": "1.0.12",
       "imported": true,
@@ -129,6 +129,6 @@
     "type": "sprite-frame",
     "hasAlpha": true,
     "fixAlphaTransparencyArtifacts": false,
-    "redirect": "87eed207-974c-43b0-b9cc-c2aa1103ed41@6c48a"
+    "redirect": "1995da1c-7816-4888-8264-8887dcd03b29@6c48a"
   }
 }

BIN
assets/bundle/gui/eliminate/texture/icon_norecord.png


+ 134 - 0
assets/bundle/gui/eliminate/texture/icon_norecord.png.meta

@@ -0,0 +1,134 @@
+{
+  "ver": "1.0.27",
+  "importer": "image",
+  "imported": true,
+  "uuid": "5b5487c1-226a-496e-af75-f14271355933",
+  "files": [
+    ".json",
+    ".png"
+  ],
+  "subMetas": {
+    "6c48a": {
+      "importer": "texture",
+      "uuid": "5b5487c1-226a-496e-af75-f14271355933@6c48a",
+      "displayName": "icon_norecord",
+      "id": "6c48a",
+      "name": "texture",
+      "userData": {
+        "wrapModeS": "clamp-to-edge",
+        "wrapModeT": "clamp-to-edge",
+        "imageUuidOrDatabaseUri": "5b5487c1-226a-496e-af75-f14271355933",
+        "isUuid": true,
+        "visible": false,
+        "minfilter": "linear",
+        "magfilter": "linear",
+        "mipfilter": "none",
+        "anisotropy": 0
+      },
+      "ver": "1.0.22",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    },
+    "f9941": {
+      "importer": "sprite-frame",
+      "uuid": "5b5487c1-226a-496e-af75-f14271355933@f9941",
+      "displayName": "icon_norecord",
+      "id": "f9941",
+      "name": "spriteFrame",
+      "userData": {
+        "trimThreshold": 1,
+        "rotated": false,
+        "offsetX": 0,
+        "offsetY": -6,
+        "trimX": 0,
+        "trimY": 12,
+        "width": 170,
+        "height": 105,
+        "rawWidth": 170,
+        "rawHeight": 117,
+        "borderTop": 0,
+        "borderBottom": 0,
+        "borderLeft": 0,
+        "borderRight": 0,
+        "packable": true,
+        "pixelsToUnit": 100,
+        "pivotX": 0.5,
+        "pivotY": 0.5,
+        "meshType": 0,
+        "vertices": {
+          "rawPosition": [
+            -85,
+            -52.5,
+            0,
+            85,
+            -52.5,
+            0,
+            -85,
+            52.5,
+            0,
+            85,
+            52.5,
+            0
+          ],
+          "indexes": [
+            0,
+            1,
+            2,
+            2,
+            1,
+            3
+          ],
+          "uv": [
+            0,
+            105,
+            170,
+            105,
+            0,
+            0,
+            170,
+            0
+          ],
+          "nuv": [
+            0,
+            0,
+            1,
+            0,
+            0,
+            0.8974358974358975,
+            1,
+            0.8974358974358975
+          ],
+          "minPos": [
+            -85,
+            -52.5,
+            0
+          ],
+          "maxPos": [
+            85,
+            52.5,
+            0
+          ]
+        },
+        "isUuid": true,
+        "imageUuidOrDatabaseUri": "5b5487c1-226a-496e-af75-f14271355933@6c48a",
+        "atlasUuid": "",
+        "trimType": "auto"
+      },
+      "ver": "1.0.12",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    }
+  },
+  "userData": {
+    "type": "sprite-frame",
+    "hasAlpha": true,
+    "fixAlphaTransparencyArtifacts": false,
+    "redirect": "5b5487c1-226a-496e-af75-f14271355933@6c48a"
+  }
+}

BIN
assets/bundle/gui/eliminate/texture/reference/提现记录-缺省页.png


+ 134 - 0
assets/bundle/gui/eliminate/texture/reference/提现记录-缺省页.png.meta

@@ -0,0 +1,134 @@
+{
+  "ver": "1.0.27",
+  "importer": "image",
+  "imported": true,
+  "uuid": "61b664df-c299-4212-a581-8e4a6f819871",
+  "files": [
+    ".json",
+    ".png"
+  ],
+  "subMetas": {
+    "6c48a": {
+      "importer": "texture",
+      "uuid": "61b664df-c299-4212-a581-8e4a6f819871@6c48a",
+      "displayName": "提现记录-缺省页",
+      "id": "6c48a",
+      "name": "texture",
+      "userData": {
+        "wrapModeS": "clamp-to-edge",
+        "wrapModeT": "clamp-to-edge",
+        "imageUuidOrDatabaseUri": "61b664df-c299-4212-a581-8e4a6f819871",
+        "isUuid": true,
+        "visible": false,
+        "minfilter": "linear",
+        "magfilter": "linear",
+        "mipfilter": "none",
+        "anisotropy": 0
+      },
+      "ver": "1.0.22",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    },
+    "f9941": {
+      "importer": "sprite-frame",
+      "uuid": "61b664df-c299-4212-a581-8e4a6f819871@f9941",
+      "displayName": "提现记录-缺省页",
+      "id": "f9941",
+      "name": "spriteFrame",
+      "userData": {
+        "trimThreshold": 1,
+        "rotated": false,
+        "offsetX": 0,
+        "offsetY": 0,
+        "trimX": 0,
+        "trimY": 0,
+        "width": 720,
+        "height": 1600,
+        "rawWidth": 720,
+        "rawHeight": 1600,
+        "borderTop": 0,
+        "borderBottom": 0,
+        "borderLeft": 0,
+        "borderRight": 0,
+        "packable": true,
+        "pixelsToUnit": 100,
+        "pivotX": 0.5,
+        "pivotY": 0.5,
+        "meshType": 0,
+        "vertices": {
+          "rawPosition": [
+            -360,
+            -800,
+            0,
+            360,
+            -800,
+            0,
+            -360,
+            800,
+            0,
+            360,
+            800,
+            0
+          ],
+          "indexes": [
+            0,
+            1,
+            2,
+            2,
+            1,
+            3
+          ],
+          "uv": [
+            0,
+            1600,
+            720,
+            1600,
+            0,
+            0,
+            720,
+            0
+          ],
+          "nuv": [
+            0,
+            0,
+            1,
+            0,
+            0,
+            1,
+            1,
+            1
+          ],
+          "minPos": [
+            -360,
+            -800,
+            0
+          ],
+          "maxPos": [
+            360,
+            800,
+            0
+          ]
+        },
+        "isUuid": true,
+        "imageUuidOrDatabaseUri": "61b664df-c299-4212-a581-8e4a6f819871@6c48a",
+        "atlasUuid": "",
+        "trimType": "auto"
+      },
+      "ver": "1.0.12",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    }
+  },
+  "userData": {
+    "type": "sprite-frame",
+    "hasAlpha": true,
+    "fixAlphaTransparencyArtifacts": false,
+    "redirect": "61b664df-c299-4212-a581-8e4a6f819871@6c48a"
+  }
+}

+ 11 - 2
assets/script/game/common/manager/LoginHandler.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-04-11 10:15:45
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-22 15:13:50
+ * @LastEditTime: 2025-04-22 18:44:21
  * @Description: 登录管理
  */
 // LoginHandler.ts
@@ -69,7 +69,16 @@ export class LoginHandler {
 
     wechatLoginFail(str: number) {
         console.log('[微信] 登录失败', str);
-        oops.gui.toast('登录失败,请重新尝试~');
+        switch (str) {
+            case -5:
+                oops.gui.toast('登录失败,微信未安装~');
+                break;
+            default:
+                oops.gui.toast('登录失败,请稍后再试~');
+                break
+
+
+        }
     }
 
 }

+ 9 - 8
assets/script/game/common/manager/ServerHandler.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-04-11 10:16:41
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-22 12:00:51
+ * @LastEditTime: 2025-04-22 19:55:58
  * @Description: 
  */
 // ServerHandler.ts
@@ -128,9 +128,9 @@ export class ServerHandler {
     onHbTxInfo(str: string) {
         console.log('[服务器] 获取红包页面信息返回', str);
         let result = JSON.parse(str);
-        smc.account.AccountModel.hbCoin = result.props["1004"];
-        smc.account.AccountModel.xcCount = result.props["1007"];  //消除次数
-        smc.account.AccountModel.goldCoin = result.props["1006"] //金砖数量
+        smc.account.AccountModel.hbCoin = result.props["1004"] || 0;
+        smc.account.AccountModel.xcCount = result.props["1007"] || 0;  //消除次数
+        smc.account.AccountModel.goldCoin = result.props["1006"] || 0; //金砖数量
         //要根据taskList的status排序,可领取再在前边,领取完在最后0 进行中 1 可领取 2已经领取
         let taskList = result.taskList.sort((a: any, b: any) => {
             if (a.status === 1 && b.status !== 1) return -1; // a 在前
@@ -154,11 +154,12 @@ export class ServerHandler {
         const props = result.data.props;
         const account = smc.account.AccountModel;
         const game = smc.game.GameModel;
-        account.wxCoin = props['1005'];
-        account.hbCoin = props['1004'];
-        account.goldCoin = props['1006'];
-        game.handlingCharge = props['1009'];
+        account.wxCoin = props['1005'] || 0;
+        account.hbCoin = props['1004'] || 0;
+        account.goldCoin = props['1006'] || 0;
+        game.handlingCharge = props['1009'] || 0;
         //返回成功才登录
+
     }
 
     //获取提现记录

+ 31 - 7
assets/script/game/view/EliminateViewComp.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-20 15:01:09
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-22 18:11:43
+ * @LastEditTime: 2025-04-22 19:37:03
  * @Description: 消除游戏主场景
  */
 import { _decorator, Button, Color, EventTouch, instantiate, JsonAsset, Label, Node, Prefab, randomRangeInt, Sprite, tween, UITransform, Vec2, Vec3, Widget } from "cc";
@@ -242,9 +242,9 @@ export class EliminateViewComp extends CCComp {
             this.guideNode.active = false;
             this.initGrid();
         }
-
         //更新福利点
         this.updateWelfarePoint();
+
     }
 
 
@@ -316,7 +316,6 @@ export class EliminateViewComp extends CCComp {
         const num = smc.account.AccountModel.goldCoin
         this.lab_goldNum.string = `${num + 1}`;
         this.gameState = GameState.PLAYING;
-
         this.randomList = this.getRandomUniqueInts();
     }
 
@@ -377,12 +376,34 @@ export class EliminateViewComp extends CCComp {
     }
 
     setupGuideStep(step: number) {
-        this.clearAllGuideGrids()
         this.gameState = GameState.PLAYING;
         this.operateFlag = true
         this.bricksList.length = 0
         this.brickNode.destroyAllChildren();
 
+        for (let rowIndex = 0; rowIndex < this.rows; rowIndex++) {
+            const currentRow: GridData[] = [];
+            this.gridList.push(currentRow);
+            for (let columnIndex = 0; columnIndex < this.cols; columnIndex++) {
+                const gridData = this.createGridData(rowIndex, columnIndex);
+                currentRow.push(gridData);
+                this.createGridNode(gridData);
+            }
+        }
+        // 初始化格子状态
+        for (let rowIndex = 0; rowIndex < this.rows; rowIndex++) {
+            for (let columnIndex = 0; columnIndex < this.cols; columnIndex++) {
+                this.gridList[rowIndex][columnIndex].status = CellState.EMPTY
+                this.generateGrid(this.gridList[rowIndex][columnIndex])
+            }
+        }
+        // 清除旋转数据
+        if (this.rotateNode) {
+            this.rotateNode.destroyAllChildren();
+        }
+        this.touchStartPos.set(Vec2.ZERO)
+        this.clearAllGuideGrids()
+
         this.guideStep = step
         const tips_node = this.guideNode.getChildByPath("tips/lab_tips");
         if (tips_node) {
@@ -393,8 +414,6 @@ export class EliminateViewComp extends CCComp {
         }
 
         if (step === 1) {
-
-
             const emptyIndex = Math.floor(this.cols / 2)
             for (let c = 0; c < this.cols; c++) {
                 if (c !== emptyIndex) {
@@ -503,9 +522,11 @@ export class EliminateViewComp extends CCComp {
             type: colorIndex,
             rotateNode: new Node(),
         }
+        console.log("brickKey>>>>>>>>>>", brickKey, colorIndex)
         const node = this.generateBrick(brickKey, colorIndex)
-        this.brickNode.addChild(node);
 
+
+        this.brickNode.addChild(node);
         const transform = this.brickNode.getComponent(UITransform);
         if (transform) {
             const midX = transform.width / 2;
@@ -751,8 +772,11 @@ export class EliminateViewComp extends CCComp {
         }
         const brickKey = Object.keys(this.brickConfig['bricks'])[randomRangeInt(0, Object.keys(this.brickConfig['bricks']).length)];
         const brickConfig = this.brickConfig['bricks'][brickKey];
+
         const num = Math.floor(Math.random() * this.randomList.length);
+
         const randomIndex = this.randomList[num];
+        // const randomIndex = this.randomList[0];
         // 生成方块
         const brickData: BrickData = {
             index,

+ 9 - 0
assets/script/game/view/WithdrawalRecordViewComp.ts

@@ -108,6 +108,15 @@ export class WithdrawalRecordViewComp extends CCComp {
         this.node.destroy();
     }
 
+    private btn_play() {
+        if (oops.gui.has(UIID.WithdrawRecord)) {
+            oops.gui.remove(UIID.WithdrawRecord)
+        }
+        if (oops.gui.has(UIID.RedPacketWithdraw)) {
+            oops.gui.remove(UIID.RedPacketWithdraw)
+        }
+    }
+
 
     //保留两位小数
     formatNumber(num: number) {