dzduole преди 18 часа
родител
ревизия
cdc32d27b2

+ 16 - 20
client/laya/bin/js/bundle.js

@@ -7707,6 +7707,7 @@
             xGame.eventMgr.on(CHANGE_SECRETARY, this, this.changeSecretary);
             xGame.eventMgr.on(LOGIN_OUT, this, this.setUserDefaultNickname);
             xGame.eventMgr.on(LOGIN_IN, this, this.event_login_in);
+            xGame.eventMgr.on("gameConfigReadyMark", this, this.event_gameConfigReadyMark);
             let curUse = DataMgr.getCurSecretary();
             this.changeSecretary(curUse);
             this.ui.talkNode.visible = false;
@@ -7857,7 +7858,6 @@
                     xGame.soundMgr.playSound(str);
                 }, 300);
             }
-            this.showGuide();
             this.ui.guideBtn.x = this.ui.liucheng2.myMask.x;
             this.ui.guideBtn.y = this.ui.liucheng2.myMask.y;
             let guide = DataMgr.getSkillGuide();
@@ -7880,15 +7880,14 @@
                 this.showTipForGuest();
             }
             this.setGlobalFont(this.ui);
-            this.yinDaoForLianxi();
         }
-        yinDaoForLianxi() {
-            let g = DataMgr.getSkillGuide();
-            if (g === 0) {
-                console.log('zh:默认的引导还没有完毕');
-                return;
-            }
+        event_gameConfigReadyMark() {
+            console.log('zh:事件触发,配置加载OK');
+            this.showGuideForLianxi();
+        }
+        showGuideForLianxi() {
             let lianXiGuide = DataMgr.getLianXiGuide();
+            console.log('zh: AAAAA练习模式引导判断:lianXiGuide=' + lianXiGuide);
             if (lianXiGuide == 0) {
                 let x = this.ui.placeBallBtn.x;
                 let y = this.ui.placeBallBtn.y;
@@ -9251,7 +9250,6 @@
             console.log('zh:checkGuideForPlaceBall =', guide);
             console.log('zh:xGame.common.gameMode=' + xGame.common.gameMode);
             if (guide == 0 && xGame.common.gameMode == GameMode.placeBall) {
-                this.selfTurn = true;
                 gameUI.n_lxms_yd1.visible = true;
             }
             else {
@@ -9260,7 +9258,7 @@
             }
             let oneBall = this.getOneBallForPlaceBall();
             gameUI.n_lxms_yd1.visible = true;
-            gameUI.n_lxms_yd1.fingerNode.x = oneBall.gameObj.x;
+            gameUI.n_lxms_yd1.fingerNode.x = oneBall.gameObj.x + 30;
             gameUI.n_lxms_yd1.fingerNode.y = oneBall.gameObj.y;
         }
         getOneBall() {
@@ -11467,7 +11465,6 @@
                 this.ui.n_lxms_yd1.visible = false;
                 console.log('zh:无需引导11');
             }
-            DataMgr.setLianXiGuide(0);
         }
         updateSelf() {
             if (xGame.common.gameMode == GameMode.classic) {
@@ -18417,6 +18414,7 @@
                     this.npcJson = npc.Data;
                     this.httpReqOkCount++;
                     console.log('zh:所有配置加载完成');
+                    xGame.eventMgr.event("gameConfigReadyMark");
                 }
                 catch (error) {
                     console.error('zh:❌请求失败:', error);
@@ -20934,7 +20932,6 @@
                 this.ui.n_lxms_yd1.visible = false;
                 console.log('zh:无需引导11');
             }
-            DataMgr.setLianXiGuide(0);
         }
         updateSelf() {
             if (xGame.common.gameMode == GameMode.classic) {
@@ -25208,6 +25205,7 @@
             xGame.eventMgr.on(CHANGE_SECRETARY, this, this.changeSecretary);
             xGame.eventMgr.on(LOGIN_OUT, this, this.setUserDefaultNickname);
             xGame.eventMgr.on(LOGIN_IN, this, this.event_login_in);
+            xGame.eventMgr.on("gameConfigReadyMark", this, this.event_gameConfigReadyMark);
             let curUse = DataMgr.getCurSecretary();
             this.changeSecretary(curUse);
             this.ui.talkNode.visible = false;
@@ -25358,7 +25356,6 @@
                     xGame.soundMgr.playSound(str);
                 }, 300);
             }
-            this.showGuide();
             this.ui.guideBtn.x = this.ui.liucheng2.myMask.x;
             this.ui.guideBtn.y = this.ui.liucheng2.myMask.y;
             let guide = DataMgr.getSkillGuide();
@@ -25381,15 +25378,14 @@
                 this.showTipForGuest();
             }
             this.setGlobalFont(this.ui);
-            this.yinDaoForLianxi();
         }
-        yinDaoForLianxi() {
-            let g = DataMgr.getSkillGuide();
-            if (g === 0) {
-                console.log('zh:默认的引导还没有完毕');
-                return;
-            }
+        event_gameConfigReadyMark() {
+            console.log('zh:事件触发,配置加载OK');
+            this.showGuideForLianxi();
+        }
+        showGuideForLianxi() {
             let lianXiGuide = DataMgr.getLianXiGuide();
+            console.log('zh: AAAAA练习模式引导判断:lianXiGuide=' + lianXiGuide);
             if (lianXiGuide == 0) {
                 let x = this.ui.placeBallBtn.x;
                 let y = this.ui.placeBallBtn.y;

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
client/laya/bin/js/bundle.js.map


+ 8 - 5
client/laya/src/core/mgrs/ConfigMgr.ts

@@ -60,6 +60,9 @@ export class ConfigMgr {
             this.httpReqOkCount++;
 
             console.log('zh:所有配置加载完成');
+          
+            xGame.eventMgr.event("gameConfigReadyMark");
+
         } catch (error) {
             console.error('zh:❌请求失败:', error);
 
@@ -83,12 +86,12 @@ export class ConfigMgr {
             });
         } finally {
             if (this.httpReqCount > this.httpReqOkCount) {
-              //  JSBridgeUtils.instance.showToast2("Check your network and restart the game.");
+                //  JSBridgeUtils.instance.showToast2("Check your network and restart the game.");
                 CustomAlert.show("Prompt", "Failed to load resources. Check your network and restart the game.", [{
-                        label: "Okay", handler: () => {
-                            JSBridgeUtils.instance.exitAndCloseGame()
-                        }
-                    }]);
+                    label: "Okay", handler: () => {
+                        JSBridgeUtils.instance.exitAndCloseGame()
+                    }
+                }]);
                 // JSBridgeUtils.instance.showConfirmationDialogForExit("Prompt", "Failed to load resources. Check your network and restart the game.");
             }
         }

+ 2 - 2
client/laya/src/game/GameMgr.ts

@@ -315,7 +315,7 @@ export default class GameMgr {
         console.log('zh:checkGuideForPlaceBall =', guide);
         console.log('zh:xGame.common.gameMode=' + xGame.common.gameMode)
         if (guide == 0 && xGame.common.gameMode == GameMode.placeBall) {
-            this.selfTurn = true;//肯定是该直接戳球了
+            // this.selfTurn = true;//肯定是该直接戳球了
             gameUI.n_lxms_yd1.visible = true;
         }
         else {
@@ -325,7 +325,7 @@ export default class GameMgr {
         //////
         let oneBall = this.getOneBallForPlaceBall();
         gameUI.n_lxms_yd1.visible = true;
-        gameUI.n_lxms_yd1.fingerNode.x = oneBall.gameObj.x;
+        gameUI.n_lxms_yd1.fingerNode.x = oneBall.gameObj.x+30;
         gameUI.n_lxms_yd1.fingerNode.y = oneBall.gameObj.y;
     }
 

+ 1 - 1
client/laya/src/ui/UIGame.ts

@@ -229,7 +229,7 @@ export class UIGame extends UIBase {
             this.ui.n_lxms_yd1.visible = false;
             console.log('zh:无需引导11')
         }
-        DataMgr.setLianXiGuide(0);
+
     }
 
 

+ 22 - 23
client/laya/src/ui/UIMain.ts

@@ -167,6 +167,8 @@ export default class UIMain extends UIBase {
         //////  xGame.eventMgr.event(GET_USER_INFO);
         //xGame.eventMgr.on(COIN_CHANGE)
 
+        xGame.eventMgr.on("gameConfigReadyMark", this, this.event_gameConfigReadyMark);
+
 
         let curUse = DataMgr.getCurSecretary();
         this.changeSecretary(curUse);
@@ -206,9 +208,6 @@ export default class UIMain extends UIBase {
         //     this.showFuLiSp1();
         // })
 
-
-
-
     }
 
     Logout() {
@@ -407,8 +406,10 @@ export default class UIMain extends UIBase {
         // }, 2000);
 
 
+        //TODO:000000000000000000---------------------0802 修改  目前使用event_gameConfigReadyMark
+        //this.showGuide();
+        // this.showGuideForLianxi();
 
-        this.showGuide();
         this.ui.guideBtn.x = this.ui.liucheng2.myMask.x;
         this.ui.guideBtn.y = this.ui.liucheng2.myMask.y;
         //
@@ -432,36 +433,33 @@ export default class UIMain extends UIBase {
             //     this.showFuLiSp1();
             // })
 
-
             Laya.timer.once(1000, this, () => {
                 console.log('zh: 1秒后  showFuLiSp7')
                 this.showFuLiSp7();
             })
-
             //引导登录
             this.showTipForGuest();
         }
-
         this.setGlobalFont(this.ui)
-
-
-
-
-        this.yinDaoForLianxi();
-
     }
 
+    event_gameConfigReadyMark() {
+        console.log('zh:事件触发,配置加载OK');
+        this.showGuideForLianxi();
+    }
 
     /**
      * 练习模式 引导  ,他给人家起名字是什么挑战模式
      */
-    yinDaoForLianxi() {
-        let g = DataMgr.getSkillGuide();
-        if (g === 0) {
-            console.log('zh:默认的引导还没有完毕');
-            return;
-        }
+    showGuideForLianxi() {
+        //下面的代码是DEBUG
+        // let g = DataMgr.getSkillGuide();
+        // if (g === 0) {
+        //     console.log('zh:默认的引导还没有完毕');
+        //     return;
+        // }
         let lianXiGuide = DataMgr.getLianXiGuide();
+        console.log('zh: AAAAA练习模式引导判断:lianXiGuide=' + lianXiGuide);
         if (lianXiGuide == 0) {
             let x = this.ui.placeBallBtn.x;
             let y = this.ui.placeBallBtn.y;
@@ -471,18 +469,19 @@ export default class UIMain extends UIBase {
             this.ui.n_yd_challenge_1_btn.x = x;
             this.ui.n_yd_challenge_1_btn.y = y;
             console.log('zh:yinDaoForLianxi set ok')
-            //  DataMgr.setLianXiGuide(1)
+        
         } else {
-            //debug后期删除
-            // DataMgr.setLianXiGuide(0)
             this.ui.n_yd_lxms_1.visible = false;
         }
 
-
     }
 
 
 
+    /**
+     * 游客模式提示
+     * @returns 
+     */
     showTipForGuest() {
         let userInfo = LocalStorageManager.getItem(keyForLoginInfo);
         if (userInfo == null) {

Някои файлове не бяха показани, защото твърде много файлове са промени