dzduole 3 days ago
parent
commit
08dc5d331c
32 changed files with 203 additions and 173 deletions
  1. 7 9
      art/fgui/.objs/workspace.json
  2. BIN
      art/fgui/assets/game/UISecretary/UIShop/asset/daoju/钻石1.png
  3. BIN
      art/fgui/assets/game/UISecretary/UIShop/asset/daoju/钻石2.png
  4. BIN
      art/fgui/assets/game/UISecretary/UIShop/asset/daoju/钻石3.png
  5. 2 2
      art/fgui/assets/game/UISecretary/UIShop/component/BallRodDisplay.xml
  6. 1 1
      art/fgui/assets/game/UISecretary/UIShop/component/daoJuDisplay.xml
  7. 6 3
      art/fgui/assets/game/package.xml
  8. 1 0
      art/fgui/assets/loading/package.xml
  9. 1 1
      client/laya/.laya/web.json
  10. BIN
      client/laya/bin/asset/fgui/game.obj
  11. BIN
      client/laya/bin/asset/fgui/game_atlas0.png
  12. BIN
      client/laya/bin/asset/fgui/game_atlas0_1.png
  13. BIN
      client/laya/bin/asset/fgui/game_atlas0_2.png
  14. 61 11
      client/laya/bin/js/bundle.js
  15. 0 0
      client/laya/bin/js/bundle.js.map
  16. 65 106
      client/laya/bin/js/cfgTable.js
  17. 2 10
      client/laya/libs/cfgTable.d.ts
  18. BIN
      client/laya/release/web/asset/fgui/game.obj
  19. BIN
      client/laya/release/web/asset/fgui/game_atlas0.png
  20. BIN
      client/laya/release/web/asset/fgui/game_atlas0_1.png
  21. BIN
      client/laya/release/web/asset/fgui/game_atlas0_2.png
  22. BIN
      client/laya/release/web/asset/fgui/game_atlas0_3.png
  23. 0 0
      client/laya/release/web/js/bundle.js
  24. 0 0
      client/laya/release/web/js/bundle.js.map
  25. 0 0
      client/laya/release/web/js/cfgTable.js
  26. 0 0
      client/laya/release/web/res/json/npc.json
  27. 1 1
      client/laya/src/GameInit.ts
  28. 17 16
      client/laya/src/core/mgrs/ConfigMgr.ts
  29. 2 2
      client/laya/src/fgui/res/game/ui_BallRodDisplay.ts
  30. 26 10
      client/laya/src/ui/UIMain.ts
  31. 9 1
      client/laya/src/ui/UIShop.ts
  32. 2 0
      client/laya/src/ui/item/DaoJuDisplay.ts

+ 7 - 9
art/fgui/.objs/workspace.json

@@ -1,5 +1,5 @@
 {
-  "libview.firstColumnWidth": 306,
+  "libview.firstColumnWidth": 270,
   "expanded_nodes": [
     "isxx5ak7",
     "/",
@@ -8,9 +8,9 @@
   ],
   "libview.iconScale": 0,
   "doc.openedDocs": [
-    "ui://isxx5ak7g1giv4ep",
-    "ui://isxx5ak7g1giv4el",
-    "ui://isxx5ak7uel8v58m"
+    "ui://isxx5ak7uel8v58m",
+    "ui://isxx5ak7uqohv4lr",
+    "ui://isxx5ak7g1giv4el"
   ],
   "test.device": "Huawei Mate20 Pro",
   "canvasColor": 10066329,
@@ -21,17 +21,15 @@
     "isxx5ak7",
     "/",
     "isxx5ak7",
-    "/UIAddProp/",
-    "isxx5ak7",
     "/UISecretary/",
     "isxx5ak7",
     "/UISecretary/UIShop/",
     "isxx5ak7",
-    "/UISecretary/UIShop/asset/",
+    "/UISecretary/UIShop/component/",
     "isxx5ak7",
-    "/UISecretary/UIShop/asset/daoju/",
+    "/_exportasset/",
     "isxx5ak7",
-    "/UISecretary/UIShop/component/"
+    "/_exportasset/daoju/"
   ],
   "auxline1": true,
   "snapToGrid": true,

BIN
art/fgui/assets/game/UISecretary/UIShop/asset/daoju/钻石1.png


BIN
art/fgui/assets/game/UISecretary/UIShop/asset/daoju/钻石2.png


BIN
art/fgui/assets/game/UISecretary/UIShop/asset/daoju/钻石3.png


+ 2 - 2
art/fgui/assets/game/UISecretary/UIShop/component/BallRodDisplay.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="543,151" designImageLayer="1">
-  <controller name="c1" alias="杆法列表" exported="true" pages="0,未选中,1,选中" selected="1"/>
+  <controller name="c1" alias="杆法列表" exported="true" pages="0,未选中,1,选中" selected="0"/>
   <displayList>
     <image id="n31_qlo0" name="n31" src="qlo041d" fileName="UISkill/asset/gf_k2.png" xy="0,0" size="543,136">
       <gearDisplay controller="c1" pages="1"/>
@@ -10,8 +10,8 @@
     </image>
     <text id="n24_qlo0" name="nameTxt" xy="5,2" size="231,32" font="Arial" fontSize="21" color="#ffffff" vAlign="middle" autoSize="none" text="Wooden cue"/>
     <loader id="n32_g1gi" name="rodImg" xy="218,-285" pivot="0.5,0.5" size="106,711" scale="0.7,-0.7" rotation="-90" url="ui://isxx5ak7hkrz3sn" align="center" vAlign="middle"/>
-    <component id="n33_g1gi" name="levelNode" src="g1giv4ey" fileName="UISecretary/UIShop/component/Component101.xml" xy="418,0" controller="c1,0"/>
     <loader id="n36_s46i" name="eftRod" xy="-1,1" size="543,151" align="center" vAlign="middle"/>
+    <component id="n33_g1gi" name="levelNode" src="g1giv4ey" fileName="UISecretary/UIShop/component/Component101.xml" xy="418,0" controller="c1,0"/>
     <component id="n34_s46i" name="purchaseBtn" src="g1giv4eh" fileName="UISecretary/UIShop/component/Component28_11.xml" xy="205,100"/>
   </displayList>
 </component>

+ 1 - 1
art/fgui/assets/game/UISecretary/UIShop/component/daoJuDisplay.xml

@@ -6,6 +6,6 @@
     <text id="n8_so7l" name="n_zuanShi" xy="175,88" size="58,42" fontSize="30" color="#ffffff" align="center" bold="true" strokeColor="#000000" text="X50"/>
     <component id="n10_so7l" name="btn_buy" src="so7lv596" fileName="UISecretary/UIShop/component/btn_buy.xml" xy="290,103"/>
     <text id="n11_so7l" name="nameTxt" xy="4,-1" size="321,42" fontSize="30" color="#ffffff" autoSize="none" bold="true" text="DAOJU NAME"/>
-    <loader id="n12_so7l" name="zsImg" xy="13,52" size="137,125" url="ui://isxx5ak7so7lv590"/>
+    <loader id="n12_so7l" name="zsImg" xy="13,51" size="137,125" url="ui://isxx5ak7q3vkv59d" align="center" vAlign="middle"/>
   </displayList>
 </component>

+ 6 - 3
art/fgui/assets/game/package.xml

@@ -1323,12 +1323,15 @@
     <image id="so7lv58x" name="底.png" path="/UIUser/asset/reg/"/>
     <image id="so7lv58y" name="输入框.png" path="/UIUser/asset/reg/"/>
     <image id="so7lv58z" name="DIAMOND.png" path="/UISecretary/UIShop/asset/daoju/"/>
-    <image id="so7lv590" name="钻石1.png" path="/UISecretary/UIShop/asset/daoju/"/>
-    <image id="so7lv591" name="钻石2.png" path="/UISecretary/UIShop/asset/daoju/"/>
-    <image id="so7lv592" name="钻石3.png" path="/UISecretary/UIShop/asset/daoju/"/>
     <image id="so7lv593" name="btn_byg.png" path="/UISecretary/UIShop/asset/daoju/"/>
     <image id="so7lv594" name="gf_k1.png" path="/UISecretary/UIShop/asset/daoju/" scale="9grid" scale9grid="115,38,3,16"/>
     <component id="so7lv596" name="btn_buy.xml" path="/UISecretary/UIShop/component/"/>
+    <image id="83s7v59a" name="sp_zs1.png" path="/UISecretary/UIShop/asset/daoju/"/>
+    <image id="83s7v59b" name="sp_zs2.png" path="/UISecretary/UIShop/asset/daoju/"/>
+    <image id="83s7v59c" name="sp_zs3.png" path="/UISecretary/UIShop/asset/daoju/"/>
+    <image id="q3vkv59d" name="sp_zs1.png" path="/_exportasset/daoju/" exported="true"/>
+    <image id="q3vkv59e" name="sp_zs2.png" path="/_exportasset/daoju/" exported="true"/>
+    <image id="q3vkv59f" name="sp_zs3.png" path="/_exportasset/daoju/" exported="true"/>
   </resources>
   <publish name="game" path="..\..\client\laya\bin\asset\fgui" packageCount="2" genCode="true" codePath="..\..\client\laya\src\fgui\res"/>
 </packageDescription>

+ 1 - 0
art/fgui/assets/loading/package.xml

@@ -69,6 +69,7 @@
     <component id="cpayv4el" name="xyItem.xml" path="/UIMoyu/"/>
     <component id="c6l6v4em" name="btn6.xml" path="/UIMoyu/"/>
     <image id="y56vv4en" name="-loading_bg.jpg" path="/assets/"/>
+    <font id="83s7v4eo" name="arial.ttf" path="/" renderMode="" samplePointSize="16"/>
   </resources>
   <publish name="loading" path="..\..\client\laya\bin\fgui" packageCount="2" genCode="true"/>
 </packageDescription>

+ 1 - 1
client/laya/.laya/web.json

@@ -65,5 +65,5 @@
     "useMinJsLibs": false,
     "es6toes5": false,
     "projectType": "ts",
-    "pubTime": 1751704523349
+    "pubTime": 1752284191510
 }

BIN
client/laya/bin/asset/fgui/game.obj


BIN
client/laya/bin/asset/fgui/game_atlas0.png


BIN
client/laya/bin/asset/fgui/game_atlas0_1.png


BIN
client/laya/bin/asset/fgui/game_atlas0_2.png


+ 61 - 11
client/laya/bin/js/bundle.js

@@ -5837,6 +5837,7 @@
             this.ui.nameTxt.text = data.name;
             this.ui.n_jiaGe.text = data.price + "";
             this.ui.n_zuanShi.text = data.price + "";
+            let baseUrl = "asset/sound/ogg/";
             this.ui.zsImg.url = xGame.common.getGameIconUrl(data.img);
         }
         buyDj() {
@@ -5875,9 +5876,11 @@
             this.itemNums = Object.keys(cfgTable.ballrodData).length;
             this.ui.myNode.myList.numItems = this.itemNums;
             this.ui.myNode.djList.itemRenderer = Laya.Handler.create(this, this.renderDaoJu, null, false);
+            console.log('zh:obj=' + this.ui.myNode.djList);
             this.daoJuArr = [];
             this.itemNumsForDj = Object.keys(cfgTable.daoJuData).length;
             this.ui.myNode.djList.numItems = this.itemNumsForDj;
+            console.log('zh:999=' + this.itemNumsForDj);
         }
         show(type) {
             super.show();
@@ -5906,12 +5909,14 @@
             if (type == "qiugan") {
                 this.ui.myNode.n_qiuGan.c1.selectedIndex = 0;
                 this.ui.myNode.n_daoju.c1.selectedIndex = 1;
+                this.ui.myNode.c1.selectedIndex = 0;
                 this.ui.myNode.myList.visible = true;
                 this.ui.myNode.djList.visible = false;
             }
             else {
                 this.ui.myNode.n_qiuGan.c1.selectedIndex = 1;
                 this.ui.myNode.n_daoju.c1.selectedIndex = 0;
+                this.ui.myNode.c1.selectedIndex = 1;
                 this.ui.myNode.myList.visible = false;
                 this.ui.myNode.djList.visible = true;
             }
@@ -7317,10 +7322,12 @@
             let yy = this.ui.secretary.height;
             let scale = xGame.common.getSecretaryScale();
             let data = { x: xx, y: yy, scaleX: scale, scaleY: scale };
-            console.log("zh:playSecretaryIdle", data);
             xGame.common.secretary.play(data, 0, true, parent);
         }
         startGame(type) {
+            if (!this.isReadyForLoadNetSource()) {
+                return;
+            }
             xGame.common.gameMode = type;
             Moyu.sendDataEvent("PlayGame", { type: type });
             console.log('zh:进入游戏gameMode =' + xGame.common.gameMode);
@@ -7427,7 +7434,23 @@
         zhouSaiMonth() {
             console.log('zh:  zhouSaiMonth 被调用');
         }
+        isReadyForLoadNetSource() {
+            let reqCount = xGame.cfgMgr.httpReqCount;
+            let ok = xGame.cfgMgr.httpReqOkCount;
+            if (reqCount > ok) {
+                xGame.uiMgr.Show(UIMsg, "Network not ready. Try again later.");
+                console.log('zh:✅❌  5秒后重新尝试加载网络资源');
+                Laya.timer.once(5000, this, () => {
+                    xGame.cfgMgr.getConfigFromServer();
+                });
+                return false;
+            }
+            return true;
+        }
         startPlaceBall() {
+            if (!this.isReadyForLoadNetSource()) {
+                return;
+            }
             xGame.uiMgr.Show(UILevelDisplay);
         }
         hide() {
@@ -15356,8 +15379,8 @@
             this.n6 = (this.getChild("n6"));
             this.nameTxt = (this.getChild("nameTxt"));
             this.rodImg = (this.getChild("rodImg"));
-            this.levelNode = (this.getChild("levelNode"));
             this.eftRod = (this.getChild("eftRod"));
+            this.levelNode = (this.getChild("levelNode"));
             this.purchaseBtn = (this.getChild("purchaseBtn"));
         }
     }
@@ -17437,26 +17460,30 @@
                         gameName: "TQ",
                         gameUserName: "zhangSan"
                     });
-                    console.log('zh:第1个请求');
+                    console.log('zh:第1个请求getClassicCfg');
                     const classicCfg = yield this.sendPostAsync('getClassicCfg', reqData);
                     this.classicCfg = classicCfg;
                     this.httpReqOkCount++;
-                    console.log('zh:第2个请求');
+                    console.log('zh:第2个请求getLevelCfg');
                     const levelCfg = yield this.sendPostAsync('getLevelCfg', reqData);
                     this.levelCfg = levelCfg;
                     this.httpReqOkCount++;
-                    console.log('zh:第3个请求');
+                    console.log('zh:第3个请求 getPlaceBallCfg');
                     const placeBallCfg = yield this.sendPostAsync('getPlaceBallCfg', reqData);
                     this.placeBallCfg = placeBallCfg;
                     this.httpReqOkCount++;
-                    console.log('zh:第4个请求npc');
+                    console.log('zh:第4个请求  npc');
                     const npc = yield this.sendPostAsync('getNpc', reqData);
                     this.npcJson = npc.Data;
                     this.httpReqOkCount++;
                     console.log('zh:所有配置加载完成');
                 }
                 catch (error) {
-                    console.error('请求失败:', error);
+                    console.error('❌请求失败:', error);
+                    Laya.timer.once(500, this, () => {
+                        console.log('zh:✅重新尝试加载网络资源');
+                        xGame.cfgMgr.getConfigFromServer();
+                    });
                 }
                 finally {
                     if (this.httpReqCount > this.httpReqOkCount) {
@@ -17481,17 +17508,17 @@
                                 resolve(parsedData);
                             }
                             else {
-                                console.log(`zh:res = ${JSON.stringify(res)}`);
+                                console.log(`zh:ERROR  res = ${JSON.stringify(res)}`);
                                 reject(new Error(`Request failed with code: ${code}`));
                             }
                         }
                         catch (error) {
-                            console.error(`error=${error}`);
+                            console.error(`ERROR=${error}`);
                             alert("Please check your network connection.");
                             reject(error);
                         }
                         finally {
-                            console.log(`zh:${action}`);
+                            console.log(`zh:${action}的请求处理完毕`);
                         }
                     });
                 });
@@ -22364,6 +22391,7 @@
             this.ui.nameTxt.text = data.name;
             this.ui.n_jiaGe.text = data.price + "";
             this.ui.n_zuanShi.text = data.price + "";
+            let baseUrl = "asset/sound/ogg/";
             this.ui.zsImg.url = xGame.common.getGameIconUrl(data.img);
         }
         buyDj() {
@@ -22402,9 +22430,11 @@
             this.itemNums = Object.keys(cfgTable.ballrodData).length;
             this.ui.myNode.myList.numItems = this.itemNums;
             this.ui.myNode.djList.itemRenderer = Laya.Handler.create(this, this.renderDaoJu, null, false);
+            console.log('zh:obj=' + this.ui.myNode.djList);
             this.daoJuArr = [];
             this.itemNumsForDj = Object.keys(cfgTable.daoJuData).length;
             this.ui.myNode.djList.numItems = this.itemNumsForDj;
+            console.log('zh:999=' + this.itemNumsForDj);
         }
         show(type) {
             super.show();
@@ -22433,12 +22463,14 @@
             if (type == "qiugan") {
                 this.ui.myNode.n_qiuGan.c1.selectedIndex = 0;
                 this.ui.myNode.n_daoju.c1.selectedIndex = 1;
+                this.ui.myNode.c1.selectedIndex = 0;
                 this.ui.myNode.myList.visible = true;
                 this.ui.myNode.djList.visible = false;
             }
             else {
                 this.ui.myNode.n_qiuGan.c1.selectedIndex = 1;
                 this.ui.myNode.n_daoju.c1.selectedIndex = 0;
+                this.ui.myNode.c1.selectedIndex = 1;
                 this.ui.myNode.myList.visible = false;
                 this.ui.myNode.djList.visible = true;
             }
@@ -23528,10 +23560,12 @@
             let yy = this.ui.secretary.height;
             let scale = xGame.common.getSecretaryScale();
             let data = { x: xx, y: yy, scaleX: scale, scaleY: scale };
-            console.log("zh:playSecretaryIdle", data);
             xGame.common.secretary.play(data, 0, true, parent);
         }
         startGame(type) {
+            if (!this.isReadyForLoadNetSource()) {
+                return;
+            }
             xGame.common.gameMode = type;
             Moyu.sendDataEvent("PlayGame", { type: type });
             console.log('zh:进入游戏gameMode =' + xGame.common.gameMode);
@@ -23638,7 +23672,23 @@
         zhouSaiMonth() {
             console.log('zh:  zhouSaiMonth 被调用');
         }
+        isReadyForLoadNetSource() {
+            let reqCount = xGame.cfgMgr.httpReqCount;
+            let ok = xGame.cfgMgr.httpReqOkCount;
+            if (reqCount > ok) {
+                xGame.uiMgr.Show(UIMsg$1, "Network not ready. Try again later.");
+                console.log('zh:✅❌  5秒后重新尝试加载网络资源');
+                Laya.timer.once(5000, this, () => {
+                    xGame.cfgMgr.getConfigFromServer();
+                });
+                return false;
+            }
+            return true;
+        }
         startPlaceBall() {
+            if (!this.isReadyForLoadNetSource()) {
+                return;
+            }
             xGame.uiMgr.Show(UILevelDisplay$1);
         }
         hide() {

File diff suppressed because it is too large
+ 0 - 0
client/laya/bin/js/bundle.js.map


+ 65 - 106
client/laya/bin/js/cfgTable.js

@@ -1000,51 +1000,51 @@ cfgTable.wordsData = {
 
 //排行榜数据
 cfgTable.paiHangBangData = {
-		"list": [{
-			"rankScore": "160",
-			"userId": "my150_1",
-			"userData": "{\"user\":{\"userId\":\"my1204nv7opn0j0ruz0u\",\"nickName\":\"SkyWalker92\",\"headIcon\":\"res/playersImg/1.png\"}}"
-		}, {
-			"rankScore": "150",
-			"userId": "my150_2",
-			"userData": "{\"user\":{\"userId\":\"my1208tvwh3z7ttej5hk\",\"nickName\":\"CoffeeNinja\",\"headIcon\":\"res/playersImg/2.png\"}}"
-		}, {
-			"rankScore": "151",
-			"userId": "my150_3",
-			"userData": "{\"user\":{\"userId\":\"my120yfv7bdb7imrttd1\",\"nickName\":\"PixelPioneer\",\"headIcon\":\"res/playersImg/3.png\"}}"
-		}, {
-			"rankScore": "145",
-			"userId": "my150_4",
-			"userData": "{\"user\":{\"userId\":\"my120hb47wlqv8ujmdle\",\"nickName\":\"BroadwayStarlet\",\"headIcon\":\"res/playersImg/4.png\"}}"
-		}, {
-			"rankScore": "140",
-			"userId": "my150_5",
-			"userData": "{\"user\":{\"userId\":\"my120e8bbxhv8rjxml2h\",\"nickName\":\"RockyMountainHigh\",\"headIcon\":\"res/playersImg/5.png\"}}"
-		}, {
-			"rankScore": "135",
-			"userId": "my150_6",
-			"userData": "{\"user\":{\"userId\":\"my1206pfouw21pfcupwd\",\"nickName\":\"SherlockWiFi\",\"headIcon\":\"res/playersImg/6.png\"}}"
-		}, {
-			"rankScore": "134",
-			"userId": "my150_7",
-			"userData": "{\"user\":{\"userId\":\"my1206pfouw21pfcupwd\",\"nickName\":\"PopcornDetective\",\"headIcon\":\"res/playersImg/7.png\"}}"
-		}, {
-			"rankScore": "131",
-			"userId": "my150_8",
-			"userData": "{\"user\":{\"userId\":\"my1206pfouw21pfcupwd\",\"nickName\":\"ZombieSurferDude\",\"headIcon\":\"res/playersImg/8.png\"}}"
-		}, {
-			"rankScore": "120",
-			"userId": "my150_9",
-			"userData": "{\"user\":{\"userId\":\"my1206pfouw21pfcupwd\",\"nickName\":\"AlienInMyBathroom\",\"headIcon\":\"res/playersImg/9.png\"}}"
-		}, {
-			"rankScore": "118",
-			"userId": "my150_10",
-			"userData": "{\"user\":{\"userId\":\"my1206pfouw21pfcupwd\",\"nickName\":\"PajamaPartyKing\",\"headIcon\":\"res/playersImg/10.png\"}}"
-		}],
-		"lastScore": "111",
-		"type": "total",
-		"rankId": "12000"
-	
+    "list": [{
+        "rankScore": "160",
+        "userId": "my150_1",
+        "userData": "{\"user\":{\"userId\":\"my1204nv7opn0j0ruz0u\",\"nickName\":\"SkyWalker92\",\"headIcon\":\"res/playersImg/1.png\"}}"
+    }, {
+        "rankScore": "150",
+        "userId": "my150_2",
+        "userData": "{\"user\":{\"userId\":\"my1208tvwh3z7ttej5hk\",\"nickName\":\"CoffeeNinja\",\"headIcon\":\"res/playersImg/2.png\"}}"
+    }, {
+        "rankScore": "151",
+        "userId": "my150_3",
+        "userData": "{\"user\":{\"userId\":\"my120yfv7bdb7imrttd1\",\"nickName\":\"PixelPioneer\",\"headIcon\":\"res/playersImg/3.png\"}}"
+    }, {
+        "rankScore": "145",
+        "userId": "my150_4",
+        "userData": "{\"user\":{\"userId\":\"my120hb47wlqv8ujmdle\",\"nickName\":\"BroadwayStarlet\",\"headIcon\":\"res/playersImg/4.png\"}}"
+    }, {
+        "rankScore": "140",
+        "userId": "my150_5",
+        "userData": "{\"user\":{\"userId\":\"my120e8bbxhv8rjxml2h\",\"nickName\":\"RockyMountainHigh\",\"headIcon\":\"res/playersImg/5.png\"}}"
+    }, {
+        "rankScore": "135",
+        "userId": "my150_6",
+        "userData": "{\"user\":{\"userId\":\"my1206pfouw21pfcupwd\",\"nickName\":\"SherlockWiFi\",\"headIcon\":\"res/playersImg/6.png\"}}"
+    }, {
+        "rankScore": "134",
+        "userId": "my150_7",
+        "userData": "{\"user\":{\"userId\":\"my1206pfouw21pfcupwd\",\"nickName\":\"PopcornDetective\",\"headIcon\":\"res/playersImg/7.png\"}}"
+    }, {
+        "rankScore": "131",
+        "userId": "my150_8",
+        "userData": "{\"user\":{\"userId\":\"my1206pfouw21pfcupwd\",\"nickName\":\"ZombieSurferDude\",\"headIcon\":\"res/playersImg/8.png\"}}"
+    }, {
+        "rankScore": "120",
+        "userId": "my150_9",
+        "userData": "{\"user\":{\"userId\":\"my1206pfouw21pfcupwd\",\"nickName\":\"AlienInMyBathroom\",\"headIcon\":\"res/playersImg/9.png\"}}"
+    }, {
+        "rankScore": "118",
+        "userId": "my150_10",
+        "userData": "{\"user\":{\"userId\":\"my1206pfouw21pfcupwd\",\"nickName\":\"PajamaPartyKing\",\"headIcon\":\"res/playersImg/10.png\"}}"
+    }],
+    "lastScore": "111",
+    "type": "total",
+    "rankId": "12000"
+
 }
 
 
@@ -1054,68 +1054,27 @@ cfgTable.paiHangBangData = {
 cfgTable.daoJuData = {
     [1]: {
         id: 1,
-        name: 'aaaaa',
-        price: 0,
-        describe: 'rookie',
-        quality: 0,
-        img: 'qg0',
-        spine: '',
-        skillLevel: 0,
-        sort: 1,
-    },
-    [2]: {
-        id: 2,
-        name: 'bbbbb',
-        price: 1000,
-        describe: 'master',
-        quality: 1,
-        img: 'qg1',
-        spine: 'qiugan1',
-        skillLevel: 0,
-        sort: 3,
+        name: 'Gem50',
+        price: 0.99,
+        describe: 'Gem50',
+        img: 'sp_zs1',
+        sort: 1
     },
-    [3]: {
-        id: 3,
-        name: 'cccc',
-        price: 1500,
-        describe: 'master',
-        quality: 1,
-        img: 'qg2',
-        spine: 'qiugan2',
-        skillLevel: 0,
-        sort: 4,
-    },
-    [4]: {
-        id: 4,
-        name: 'ddd',
-        price: 2000,
-        describe: 'master',
-        quality: 1,
-        img: 'qg3',
-        spine: 'qiugan3',
-        skillLevel: 0,
-        sort: 5,
-    },
-    [5]: {
-        id: 5,
-        name: 'eee',
-        price: 3000,
-        describe: 'legend',
-        quality: 2,
-        img: 'qg4',
-        spine: 'qiugan4',
-        skillLevel: 0,
-        sort: 6,
+     [2]: {
+        id: 1,
+        name: 'Gem100',
+        price: 1.99,
+        describe: 'Gem100',
+        img: 'sp_zs2',
+        sort: 2
     },
-    [6]: {
-        id: 6,
-        name: 'ffff',
-        price: 0,
-        describe: 'rookie',
-        quality: 0,
-        img: 'qg5',
-        spine: '',
-        skillLevel: 0,
-        sort: 2,
+     [3]: {
+        id: 1,
+        name: 'Gem500',
+        price: 4.99,
+        describe: 'Gem500',
+        img: 'sp_zs3',
+        sort: 3
     },
+
 }

+ 2 - 10
client/laya/libs/cfgTable.d.ts

@@ -60,22 +60,14 @@ declare namespace cfgTable {
         readonly price: number;
         //品级描述
         readonly describe: string;
-        //品级
-        readonly quality: number;
+       
         //图标名称
         readonly img: string;
-        //spine名称
-        readonly spine: string;
-        //增加所有技能等级
-        readonly skillLevel: number;
+     
         //排列顺序
         readonly sort: number;
 
 
-        //钻石数量
-        //readonly zuanShiCount:number;
-
-
     }
     //道具购买
     export const daoJuData: { [key: number]: daoJu };

BIN
client/laya/release/web/asset/fgui/game.obj


BIN
client/laya/release/web/asset/fgui/game_atlas0.png


BIN
client/laya/release/web/asset/fgui/game_atlas0_1.png


BIN
client/laya/release/web/asset/fgui/game_atlas0_2.png


BIN
client/laya/release/web/asset/fgui/game_atlas0_3.png


File diff suppressed because it is too large
+ 0 - 0
client/laya/release/web/js/bundle.js


File diff suppressed because it is too large
+ 0 - 0
client/laya/release/web/js/bundle.js.map


File diff suppressed because it is too large
+ 0 - 0
client/laya/release/web/js/cfgTable.js


File diff suppressed because it is too large
+ 0 - 0
client/laya/release/web/res/json/npc.json


+ 1 - 1
client/laya/src/GameInit.ts

@@ -9,7 +9,7 @@ import UIMain from "./UI/UIMain";
 import { xGame } from "./xGame";
 
 /**
- * 自定义shader初始化
+ * 自定义shader初始化   
  */
 export function InitShader() {
 

+ 17 - 16
client/laya/src/core/mgrs/ConfigMgr.ts

@@ -18,6 +18,8 @@ export class ConfigMgr {
     public classicCfg: any;
     public levelCfg: any;
     public placeBallCfg: any;
+
+
     public init() {
         //this.npcJson = Laya.loader.getRes("res/json/npc.json").Data;
         //this.classicCfg = Laya.loader.getRes("res/json/classicCfg.json");
@@ -29,9 +31,9 @@ export class ConfigMgr {
     }
 
     //应该有多少个请求
-    private httpReqCount: number = 4;
+    public httpReqCount: number = 4;
     //成功了多少个请求
-    private httpReqOkCount: number = 0;
+    public httpReqOkCount: number = 0;
     // 使用 async/await 按顺序执行请求
     public getConfigFromServer = async (): Promise<void> => {
         try {
@@ -40,35 +42,35 @@ export class ConfigMgr {
                 gameName: "TQ",
                 gameUserName: "zhangSan"
             });
-            console.log('zh:第1个请求');
+            console.log('zh:第1个请求getClassicCfg');
             const classicCfg = await this.sendPostAsync('getClassicCfg', reqData);
             this.classicCfg = classicCfg;
             this.httpReqOkCount++;
 
-            console.log('zh:第2个请求');
+            console.log('zh:第2个请求getLevelCfg');
             const levelCfg = await this.sendPostAsync('getLevelCfg', reqData);
             this.levelCfg = levelCfg;
             this.httpReqOkCount++;
 
-            console.log('zh:第3个请求');
+            console.log('zh:第3个请求 getPlaceBallCfg');
             const placeBallCfg = await this.sendPostAsync('getPlaceBallCfg', reqData);
             this.placeBallCfg = placeBallCfg;
             this.httpReqOkCount++;
 
-            console.log('zh:第4个请求npc');
+            console.log('zh:第4个请求  npc');
             const npc = await this.sendPostAsync('getNpc', reqData);
             this.npcJson = npc.Data;
-           // console.log('zh:npcJson Data==  ' + JSON.stringify(npc));
             this.httpReqOkCount++;
 
-
             console.log('zh:所有配置加载完成');
         } catch (error) {
-            console.error('请求失败:', error);
+            console.error('❌请求失败:', error);
+            Laya.timer.once(500, this, () => {
+                console.log('zh:✅重新尝试加载网络资源');
+                xGame.cfgMgr.getConfigFromServer();
+            });
         } finally {
-
             if (this.httpReqCount > this.httpReqOkCount) {
-
                 CustomAlert.show("Prompt", "Failed to load resources. Check your network and restart the game.", [
                     {
                         label: "Okay", handler: () => {
@@ -77,8 +79,6 @@ export class ConfigMgr {
                         }
                     }
                 ]);
-
-
             }
         }
     }
@@ -89,6 +89,7 @@ export class ConfigMgr {
 
 
 
+
     private test() {
         let reqData = JSON.stringify({
             gameName: "TQ",
@@ -126,15 +127,15 @@ export class ConfigMgr {
                         const parsedData = JSON.parse(res.msg);
                         resolve(parsedData);
                     } else {
-                        console.log(`zh:res = ${JSON.stringify(res)}`);
+                        console.log(`zh:ERROR  res = ${JSON.stringify(res)}`);
                         reject(new Error(`Request failed with code: ${code}`));
                     }
                 } catch (error) {
-                    console.error(`error=${error}`);
+                    console.error(`ERROR=${error}`);
                     alert("Please check your network connection.");
                     reject(error);
                 } finally {
-                    console.log(`zh:${action}`);
+                    console.log(`zh:${action}的请求处理完毕`);
                 }
             });
         });

+ 2 - 2
client/laya/src/fgui/res/game/ui_BallRodDisplay.ts

@@ -10,8 +10,8 @@ export default class ui_BallRodDisplay extends fgui.GComponent {
 	public n6:fgui.GImage;
 	public nameTxt:fgui.GTextField;
 	public rodImg:fgui.GLoader;
-	public levelNode:ui_Component101;
 	public eftRod:fgui.GLoader;
+	public levelNode:ui_Component101;
 	public purchaseBtn:ui_Component28_11;
 	public static URL:string = "ui://isxx5ak7uqohv4lr";
 
@@ -25,8 +25,8 @@ export default class ui_BallRodDisplay extends fgui.GComponent {
 		this.n6 = <fgui.GImage>(this.getChild("n6"));
 		this.nameTxt = <fgui.GTextField>(this.getChild("nameTxt"));
 		this.rodImg = <fgui.GLoader>(this.getChild("rodImg"));
-		this.levelNode = <ui_Component101>(this.getChild("levelNode"));
 		this.eftRod = <fgui.GLoader>(this.getChild("eftRod"));
+		this.levelNode = <ui_Component101>(this.getChild("levelNode"));
 		this.purchaseBtn = <ui_Component28_11>(this.getChild("purchaseBtn"));
 	}
 }

+ 26 - 10
client/laya/src/ui/UIMain.ts

@@ -200,9 +200,9 @@ export default class UIMain extends UIBase {
         }
     }
     gotoLogin() {
-       
+
         xGame.uiMgr.Show(UILogin);
-        
+
     }
 
     gotoRegUser() {
@@ -370,13 +370,15 @@ export default class UIMain extends UIBase {
         //  yy = Laya.stage.height;
         let scale = xGame.common.getSecretaryScale();
         let data = { x: xx, y: yy, scaleX: scale, scaleY: scale };
-        console.log("zh:playSecretaryIdle", data);
+        //console.log("zh:playSecretaryIdle", data);
         //xGame.common.secretary.play(data, 1, true, parent);  这是老的秘书
 
         xGame.common.secretary.play(data, 0, true, parent);
     }
     startGame(type: GameMode) {
-
+        if (!this.isReadyForLoadNetSource()) {
+            return;
+        }
         //  console.log('zh: 停止播放主頁面背景音乐');
         // xGame.soundMgr.stopMusic();
 
@@ -508,13 +510,27 @@ export default class UIMain extends UIBase {
     zhouSaiMonth() {
         console.log('zh:  zhouSaiMonth 被调用')
     }
-    startPlaceBall() {
-
+    //网络资源是否准备好了
+    public isReadyForLoadNetSource(): boolean {
+        let reqCount = xGame.cfgMgr.httpReqCount;
+        let ok = xGame.cfgMgr.httpReqOkCount;
+        if (reqCount > ok) {
+            //console.log('zh:网络资源没有准备完成,请稍后再试');
+            xGame.uiMgr.Show(UIMsg, "Network not ready. Try again later.")
+            console.log('zh:✅❌  5秒后重新尝试加载网络资源');
+            Laya.timer.once(5000, this, () => {
+                xGame.cfgMgr.getConfigFromServer();
+            });
+            return false;
+        }
+        return true;
+    }
 
+    startPlaceBall() {
+        if (!this.isReadyForLoadNetSource()) {
+            return;
+        }
         xGame.uiMgr.Show(UILevelDisplay);
-        //xGame.uiMgr.Show(UIMsg, "敬请期待~")
-
-
     }
     public hide(): void {
         console.log('zh:uimain  hide ...');
@@ -612,7 +628,7 @@ export default class UIMain extends UIBase {
         Moyu.sendDataEvent("secretary");
     }
     openShopView() {
-        xGame.uiMgr.Show(UIShop,0);
+        xGame.uiMgr.Show(UIShop, 0);
     }
     openSignView() {
         xGame.uiMgr.Show(UISign);

+ 9 - 1
client/laya/src/ui/UIShop.ts

@@ -31,7 +31,7 @@ export default class UIShop extends UIBase {
         // this.addUIClick(this.ui.btn_daoju, this.test123);
         this.addUIClick(this.ui, this.interuptSecretary);
 
-        // console.log('zh:this.renderBallRodthis.renderBallRodthis.renderBallRodthis.renderBallRod = ' + this.renderBallRod)
+    
         this.ui.myNode.myList.itemRenderer = Laya.Handler.create(this, this.renderBallRod, null, false);
         this.ballRodArr = [];
         this.itemNums = Object.keys(cfgTable.ballrodData).length;
@@ -41,9 +41,11 @@ export default class UIShop extends UIBase {
 
         //道具数据----------------start
         this.ui.myNode.djList.itemRenderer = Laya.Handler.create(this, this.renderDaoJu, null, false);
+        console.log('zh:obj=' + this.ui.myNode.djList);
         this.daoJuArr = [];
         this.itemNumsForDj = Object.keys(cfgTable.daoJuData).length;
         this.ui.myNode.djList.numItems = this.itemNumsForDj;
+        console.log('zh:999=' + this.itemNumsForDj);
         //道具数据----------------end
 
     }
@@ -74,15 +76,21 @@ export default class UIShop extends UIBase {
                 this.curType = type;
             }
         }
+
         if (type == "qiugan") {
+
             this.ui.myNode.n_qiuGan.c1.selectedIndex = 0;
             this.ui.myNode.n_daoju.c1.selectedIndex = 1;
+
+            this.ui.myNode.c1.selectedIndex = 0;
             this.ui.myNode.myList.visible = true;
             this.ui.myNode.djList.visible = false;
         }
         else {
+
             this.ui.myNode.n_qiuGan.c1.selectedIndex = 1;
             this.ui.myNode.n_daoju.c1.selectedIndex = 0;
+            this.ui.myNode.c1.selectedIndex = 1;
             this.ui.myNode.myList.visible = false;
             this.ui.myNode.djList.visible = true;
         }

+ 2 - 0
client/laya/src/ui/item/DaoJuDisplay.ts

@@ -26,6 +26,8 @@ export default class DaoJuDisplay {
         this.ui.nameTxt.text = data.name;
         this.ui.n_jiaGe.text = data.price + "";
         this.ui.n_zuanShi.text = data.price+"";
+
+        let baseUrl = "asset/sound/ogg/";
         this.ui.zsImg.url = xGame.common.getGameIconUrl(data.img);
         // this.ui.levelNode.c1.selectedIndex = data.quality;
         //  this.ui.purchaseBtn.diamondTxt.text = data.price + "";

Some files were not shown because too many files changed in this diff