dzduole 1 dia atrás
pai
commit
c15b8fe43c

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


+ 202 - 4
client/laya/bin/js/bundle.js

@@ -3154,7 +3154,9 @@
             xGame.common.d2World.d2Gan.ui.rotation = angle;
             xGame.common.d2World.getHelpLine();
             xGame.common.clickedBall = true;
+            console.log('zh:点击之后=判断引导');
             this.checkGuide();
+            this.checkGuideForLianXi();
         }
         checkGuide() {
             let guide = DataMgr.getSkillGuide();
@@ -3164,6 +3166,22 @@
                 xGame.common.gameUI.ui.guide2.visible = true;
             }
         }
+        checkGuideForLianXi() {
+            let guide_lianxi = DataMgr.getLianXiGuide();
+            if (guide_lianxi == 0 && xGame.common.gameMode == GameMode.placeBall && xGame.common.guideStepForLianXi == 0) {
+                xGame.common.guideStepForLianXi = 1;
+                xGame.common.gameUI.ui.n_lxms_yd1.visible = true;
+                return;
+            }
+            if (guide_lianxi == 0 && xGame.common.gameMode == GameMode.placeBall && xGame.common.guideStepForLianXi == 1) {
+                xGame.common.guideStepForLianXi = 2;
+                xGame.common.gameUI.ui.n_lxms_yd1.visible = false;
+                xGame.common.gameUI.ui.n_lxms_yd2.visible = true;
+            }
+            else {
+                console.log('zh: xGame.common.guideStepForLianXi=' + xGame.common.guideStepForLianXi);
+            }
+        }
         checkDistance(disX, disY, angle) {
             let diameter = this.gameObj.width - 1;
             let dis = Math.pow(disX - this.gameObj.x, 2) + Math.pow(disY - this.gameObj.y, 2);
@@ -4471,6 +4489,9 @@
             this.guide1 = (this.getChild("guide1"));
             this.guide3 = (this.getChild("guide3"));
             this.guideNode = (this.getChild("guideNode"));
+            this.n_lxms_yd1 = (this.getChild("n_lxms_yd1"));
+            this.n_lxms_yd2 = (this.getChild("n_lxms_yd2"));
+            this.n_lxms_yd3 = (this.getChild("n_lxms_yd3"));
         }
     }
     ui_UIGame.URL = "ui://isxx5ak7kt443qg";
@@ -5180,7 +5201,6 @@
                 this.ui.myNode.n_yd_3.visible = false;
                 console.log('zh:无需引导33');
             }
-            DataMgr.setLianXiGuide(0);
         }
         showPreView() {
             let item;
@@ -5263,7 +5283,14 @@
                 console.log('zh:eeeee');
             }
             else {
-                console.log('zh:powerEnough 不足 =' + DataMgr.powerEnough());
+                let guide = DataMgr.getLianXiGuide();
+                if (guide == 0 && xGame.common.gameMode == GameMode.placeBall) {
+                    console.log('zh:自动添加2点体力,以便于完成练习引导模式');
+                    DataMgr.setPower(2);
+                }
+                console.log('zh:guide = ' + guide);
+                console.log('zh:xGame.common.gameMode = ' + xGame.common.gameMode);
+                console.log('zh:powerEnough不足=' + DataMgr.powerEnough());
                 xGame.uiMgr.Show(UIPower);
             }
         }
@@ -9114,6 +9141,7 @@
             }
             xGame.common.gameUI.setTurnAlpha(this.selfTurn);
             this.checkGuide();
+            this.checkGuideForPlaceBall();
             if (xGame.common.uiRodMethod)
                 xGame.common.uiRodMethod.resetRod();
             xGame.common.d2World.getHelpLine();
@@ -9199,6 +9227,7 @@
             this.firstShoot = true;
         }
         checkGuide() {
+            console.log('zh: 检查引导123');
             let guide = DataMgr.getSkillGuide();
             let gameUI = xGame.common.gameUI.ui;
             gameUI.guide1.visible = false;
@@ -9215,6 +9244,25 @@
             gameUI.guide1.fingerNode.x = oneBall.gameObj.x;
             gameUI.guide1.fingerNode.y = oneBall.gameObj.y;
         }
+        checkGuideForPlaceBall() {
+            console.log('zh: 检查引导123 checkGuideForPlaceBall');
+            let gameUI = xGame.common.gameUI.ui;
+            let guide = DataMgr.getLianXiGuide();
+            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 {
+                gameUI.n_lxms_yd1.visible = false;
+                return;
+            }
+            let oneBall = this.getOneBallForPlaceBall();
+            gameUI.n_lxms_yd1.visible = true;
+            gameUI.n_lxms_yd1.fingerNode.x = oneBall.gameObj.x;
+            gameUI.n_lxms_yd1.fingerNode.y = oneBall.gameObj.y;
+        }
         getOneBall() {
             let arr = xGame.common.d2World.ballArr;
             for (let index = 0; index < arr.length; index++) {
@@ -9223,6 +9271,10 @@
                 return arr[index];
             }
         }
+        getOneBallForPlaceBall() {
+            let arr = xGame.common.d2World.ballArr;
+            return arr[2];
+        }
         updateSelfScore() {
             let ui = xGame.common.gameUI.ui.topNode;
             ui.selfScoreTxt.text = this.selfScore + "";
@@ -11396,8 +11448,27 @@
             this.updateHead();
             let curUse = DataMgr.getCurBallRod();
             this.getGanZiImg();
+            this.yinDaoForLianxi();
             this.setGlobalFont(this.ui);
         }
+        yinDaoForLianxi() {
+            let g = DataMgr.getSkillGuide();
+            if (g === 0) {
+                console.log('zh:默认的引导还没有完毕');
+                return;
+            }
+            let lianXiGuide = DataMgr.getLianXiGuide();
+            console.log('zh:lianXiGuide=', lianXiGuide);
+            if (lianXiGuide === 0) {
+                this.ui.n_lxms_yd1.visible = true;
+                console.log('zh:yinDaoForLianxi 111 set ok');
+            }
+            else {
+                this.ui.n_lxms_yd1.visible = false;
+                console.log('zh:无需引导11');
+            }
+            DataMgr.setLianXiGuide(0);
+        }
         updateSelf() {
             if (xGame.common.gameMode == GameMode.classic) {
                 this.ui.c1.selectedIndex = 0;
@@ -11417,6 +11488,7 @@
                 xGame.common.bigMoveLevelIndex = rand;
             }
             else if (xGame.common.gameMode == GameMode.placeBall) {
+                console.log('zh:练习模式...');
                 let data = cfgTable.placeballData[xGame.common.placeBallCurLevel];
                 this.ui.c1.selectedIndex = 1 + data.type;
                 this.ui.alpha = 1;
@@ -11657,6 +11729,7 @@
                     xGame.common.d2World.d2Gan.rotateSelf(yy, true);
                     let h = ruler1.height;
                     this.checkGuide();
+                    this.checkGuideForLxms();
                     this.isMoveRod = true;
                     if (ruler1.y >= h) {
                         ruler1.y = -h;
@@ -11711,6 +11784,7 @@
                         xGame.common.d2World.d2Gan.shoot();
                         xGame.common.d2World.d2HelpLine.shoot();
                         this.finishGuide();
+                        this.finishGuideForLxms();
                         this.ui.powerEft.visible = false;
                         this.ui.colorNode.visible = false;
                         let ganStr = "";
@@ -11768,6 +11842,14 @@
                 xGame.common.gameUI.ui.guide3.visible = true;
             }
         }
+        checkGuideForLxms() {
+            let guide = DataMgr.getLianXiGuide();
+            if (guide == 0 && xGame.common.gameMode == GameMode.placeBall && xGame.common.guideStepForLianXi == 2) {
+                xGame.common.gameUI.ui.n_lxms_yd2.visible = false;
+                xGame.common.gameUI.ui.n_lxms_yd3.visible = true;
+                xGame.common.guideStepForLianXi = 3;
+            }
+        }
         finishGuide() {
             let guide = DataMgr.getSkillGuide();
             if (guide == 0 && xGame.common.gameMode == GameMode.bigMove) {
@@ -11777,11 +11859,26 @@
                 JSBridgeUtils.instance.logEventForAdNoParams("tutorial_complete");
             }
         }
+        finishGuideForLxms() {
+            let guide = DataMgr.getLianXiGuide();
+            if (guide == 0 && xGame.common.gameMode == GameMode.placeBall) {
+                xGame.common.guideStepForLianXi = 3;
+                DataMgr.setLianXiGuide(1);
+                this.closeAllGuideForLxms();
+                console.log('zh: lxms新手引导完毕');
+                JSBridgeUtils.instance.logEventForAdNoParams("tutorial_complete");
+            }
+        }
         closeAllGuide() {
             xGame.common.gameUI.ui.guide1.visible = false;
             xGame.common.gameUI.ui.guide2.visible = false;
             xGame.common.gameUI.ui.guide3.visible = false;
         }
+        closeAllGuideForLxms() {
+            xGame.common.gameUI.ui.n_lxms_yd1.visible = false;
+            xGame.common.gameUI.ui.n_lxms_yd2.visible = false;
+            xGame.common.gameUI.ui.n_lxms_yd3.visible = false;
+        }
         updateBarInfo() {
             let star = this.ui.powerNode.y;
             let rate = (this.barInfo.curY - star) / this.barInfo.height;
@@ -12557,6 +12654,7 @@
             this.longHelpLine = false;
             this.maxShareDiamondTimes = 3;
             this.guideStep = 0;
+            this.guideStepForLianXi = 0;
             this.temSelfLevel = 0;
             this.extraMoveNum = 0;
             this.curRankID = 0;
@@ -16063,6 +16161,52 @@
     }
     ui_Component119.URL = "ui://isxx5ak7u8eiv4i3";
 
+    class ui_Component_yd1 extends fgui.GComponent {
+        static createInstance() {
+            return (fgui.UIPackage.createObject("game", "Component_yd1"));
+        }
+        onConstruct() {
+            this.n83 = (this.getChild("n83"));
+            this.fingerNode = (this.getChild("fingerNode"));
+            this.n84 = (this.getChild("n84"));
+        }
+    }
+    ui_Component_yd1.URL = "ui://isxx5ak7uc2qv5b3";
+
+    class ui_Component_yd2 extends fgui.GComponent {
+        static createInstance() {
+            return (fgui.UIPackage.createObject("game", "Component_yd2"));
+        }
+        onConstruct() {
+            this.n85 = (this.getChild("n85"));
+            this.n86 = (this.getChild("n86"));
+            this.n77 = (this.getChild("n77"));
+            this.n79 = (this.getChild("n79"));
+            this.n80 = (this.getChild("n80"));
+            this.n81 = (this.getChild("n81"));
+            this.n82 = (this.getChild("n82"));
+            this.n84 = (this.getChild("n84"));
+            this.n87 = (this.getChild("n87"));
+            this.t0 = this.getTransition("t0");
+        }
+    }
+    ui_Component_yd2.URL = "ui://isxx5ak7uc2qv5b5";
+
+    class ui_Component_yd3 extends fgui.GComponent {
+        static createInstance() {
+            return (fgui.UIPackage.createObject("game", "Component_yd3"));
+        }
+        onConstruct() {
+            this.n87 = (this.getChild("n87"));
+            this.n88 = (this.getChild("n88"));
+            this.n84 = (this.getChild("n84"));
+            this.n85 = (this.getChild("n85"));
+            this.n86 = (this.getChild("n86"));
+            this.t0 = this.getTransition("t0");
+        }
+    }
+    ui_Component_yd3.URL = "ui://isxx5ak7uc2qv5b6";
+
     class ui_daoJuDisplay extends fgui.GComponent {
         static createInstance() {
             return (fgui.UIPackage.createObject("game", "daoJuDisplay"));
@@ -17049,6 +17193,9 @@
             fgui.UIObjectFactory.setExtension(ui_againBtn.URL, ui_againBtn);
             fgui.UIObjectFactory.setExtension(ui_Component118.URL, ui_Component118);
             fgui.UIObjectFactory.setExtension(ui_Component119.URL, ui_Component119);
+            fgui.UIObjectFactory.setExtension(ui_Component_yd1.URL, ui_Component_yd1);
+            fgui.UIObjectFactory.setExtension(ui_Component_yd2.URL, ui_Component_yd2);
+            fgui.UIObjectFactory.setExtension(ui_Component_yd3.URL, ui_Component_yd3);
             fgui.UIObjectFactory.setExtension(ui_daoJuDisplay.URL, ui_daoJuDisplay);
             fgui.UIObjectFactory.setExtension(ui_Component132_1.URL, ui_Component132_1);
             fgui.UIObjectFactory.setExtension(ui_Component_lc_challenge1.URL, ui_Component_lc_challenge1);
@@ -20769,8 +20916,27 @@
             this.updateHead();
             let curUse = DataMgr.getCurBallRod();
             this.getGanZiImg();
+            this.yinDaoForLianxi();
             this.setGlobalFont(this.ui);
         }
+        yinDaoForLianxi() {
+            let g = DataMgr.getSkillGuide();
+            if (g === 0) {
+                console.log('zh:默认的引导还没有完毕');
+                return;
+            }
+            let lianXiGuide = DataMgr.getLianXiGuide();
+            console.log('zh:lianXiGuide=', lianXiGuide);
+            if (lianXiGuide === 0) {
+                this.ui.n_lxms_yd1.visible = true;
+                console.log('zh:yinDaoForLianxi 111 set ok');
+            }
+            else {
+                this.ui.n_lxms_yd1.visible = false;
+                console.log('zh:无需引导11');
+            }
+            DataMgr.setLianXiGuide(0);
+        }
         updateSelf() {
             if (xGame.common.gameMode == GameMode.classic) {
                 this.ui.c1.selectedIndex = 0;
@@ -20790,6 +20956,7 @@
                 xGame.common.bigMoveLevelIndex = rand;
             }
             else if (xGame.common.gameMode == GameMode.placeBall) {
+                console.log('zh:练习模式...');
                 let data = cfgTable.placeballData[xGame.common.placeBallCurLevel];
                 this.ui.c1.selectedIndex = 1 + data.type;
                 this.ui.alpha = 1;
@@ -21030,6 +21197,7 @@
                     xGame.common.d2World.d2Gan.rotateSelf(yy, true);
                     let h = ruler1.height;
                     this.checkGuide();
+                    this.checkGuideForLxms();
                     this.isMoveRod = true;
                     if (ruler1.y >= h) {
                         ruler1.y = -h;
@@ -21084,6 +21252,7 @@
                         xGame.common.d2World.d2Gan.shoot();
                         xGame.common.d2World.d2HelpLine.shoot();
                         this.finishGuide();
+                        this.finishGuideForLxms();
                         this.ui.powerEft.visible = false;
                         this.ui.colorNode.visible = false;
                         let ganStr = "";
@@ -21141,6 +21310,14 @@
                 xGame.common.gameUI.ui.guide3.visible = true;
             }
         }
+        checkGuideForLxms() {
+            let guide = DataMgr.getLianXiGuide();
+            if (guide == 0 && xGame.common.gameMode == GameMode.placeBall && xGame.common.guideStepForLianXi == 2) {
+                xGame.common.gameUI.ui.n_lxms_yd2.visible = false;
+                xGame.common.gameUI.ui.n_lxms_yd3.visible = true;
+                xGame.common.guideStepForLianXi = 3;
+            }
+        }
         finishGuide() {
             let guide = DataMgr.getSkillGuide();
             if (guide == 0 && xGame.common.gameMode == GameMode.bigMove) {
@@ -21150,11 +21327,26 @@
                 JSBridgeUtils.instance.logEventForAdNoParams("tutorial_complete");
             }
         }
+        finishGuideForLxms() {
+            let guide = DataMgr.getLianXiGuide();
+            if (guide == 0 && xGame.common.gameMode == GameMode.placeBall) {
+                xGame.common.guideStepForLianXi = 3;
+                DataMgr.setLianXiGuide(1);
+                this.closeAllGuideForLxms();
+                console.log('zh: lxms新手引导完毕');
+                JSBridgeUtils.instance.logEventForAdNoParams("tutorial_complete");
+            }
+        }
         closeAllGuide() {
             xGame.common.gameUI.ui.guide1.visible = false;
             xGame.common.gameUI.ui.guide2.visible = false;
             xGame.common.gameUI.ui.guide3.visible = false;
         }
+        closeAllGuideForLxms() {
+            xGame.common.gameUI.ui.n_lxms_yd1.visible = false;
+            xGame.common.gameUI.ui.n_lxms_yd2.visible = false;
+            xGame.common.gameUI.ui.n_lxms_yd3.visible = false;
+        }
         updateBarInfo() {
             let star = this.ui.powerNode.y;
             let rate = (this.barInfo.curY - star) / this.barInfo.height;
@@ -22168,7 +22360,6 @@
                 this.ui.myNode.n_yd_3.visible = false;
                 console.log('zh:无需引导33');
             }
-            DataMgr.setLianXiGuide(0);
         }
         showPreView() {
             let item;
@@ -22251,7 +22442,14 @@
                 console.log('zh:eeeee');
             }
             else {
-                console.log('zh:powerEnough 不足 =' + DataMgr.powerEnough());
+                let guide = DataMgr.getLianXiGuide();
+                if (guide == 0 && xGame.common.gameMode == GameMode.placeBall) {
+                    console.log('zh:自动添加2点体力,以便于完成练习引导模式');
+                    DataMgr.setPower(2);
+                }
+                console.log('zh:guide = ' + guide);
+                console.log('zh:xGame.common.gameMode = ' + xGame.common.gameMode);
+                console.log('zh:powerEnough不足=' + DataMgr.powerEnough());
                 xGame.uiMgr.Show(UIPower$1);
             }
         }

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
client/laya/bin/js/bundle.js.map


+ 25 - 1
client/laya/src/d2Obj/D2BallSrc.ts

@@ -276,7 +276,7 @@ export default class D2BallSrc extends Laya.Script {
     //如果是挑战关卡并且未领取奖励则飞金币
     runFlyEft() {
         if (xGame.common.gameMode == GameMode.placeBall && xGame.common.gameMgr.placeBallData.type == PlaceBallType.challenge) {
-            xGame.common.playAwardSpine(this.gameObj.x+100, this.gameObj.y-100);
+            xGame.common.playAwardSpine(this.gameObj.x + 100, this.gameObj.y - 100);
         }
     }
     hideSelf() {
@@ -332,6 +332,7 @@ export default class D2BallSrc extends Laya.Script {
             this.checkWrongBall();
         }
     }
+    //点击球
     onClick(e, force = false) {
         if (this.number == 0) return;
         if (force) {
@@ -354,7 +355,9 @@ export default class D2BallSrc extends Laya.Script {
         //
         xGame.common.clickedBall = true;
         //
+        console.log('zh:点击之后=判断引导')
         this.checkGuide();
+        this.checkGuideForLianXi();
     }
     checkGuide() {
         let guide = DataMgr.getSkillGuide();
@@ -363,7 +366,28 @@ export default class D2BallSrc extends Laya.Script {
             xGame.common.gameUI.ui.guide1.visible = false;
             xGame.common.gameUI.ui.guide2.visible = true;
         }
+
+    }
+
+    checkGuideForLianXi() {
+        //练习模式
+        let guide_lianxi = DataMgr.getLianXiGuide();
+        //guideStepForLianXi ===0  会有BUG,因为AI回自动点击一下,所以这里判断改为1
+        if (guide_lianxi == 0 && xGame.common.gameMode == GameMode.placeBall && xGame.common.guideStepForLianXi == 0) {
+            xGame.common.guideStepForLianXi = 1;
+            xGame.common.gameUI.ui.n_lxms_yd1.visible = true;
+            return;
+        }
+        if (guide_lianxi == 0 && xGame.common.gameMode == GameMode.placeBall && xGame.common.guideStepForLianXi == 1) {
+            xGame.common.guideStepForLianXi = 2;
+            xGame.common.gameUI.ui.n_lxms_yd1.visible = false;
+            xGame.common.gameUI.ui.n_lxms_yd2.visible = true;//标尺上下指示
+        } else {
+            console.log('zh: xGame.common.guideStepForLianXi=' + xGame.common.guideStepForLianXi)
+        }
     }
+
+
     //上一次计算离,母球的距离
     lastDis: number = 0;
     helpOut = { type: "", x: 0, y: 0 };

+ 6 - 0
client/laya/src/fgui/res/game/gameBinder.ts

@@ -229,6 +229,9 @@ import ui_Component41_1 from "./ui_Component41_1";
 import ui_againBtn from "./ui_againBtn";
 import ui_Component118 from "./ui_Component118";
 import ui_Component119 from "./ui_Component119";
+import ui_Component_yd1 from "./ui_Component_yd1";
+import ui_Component_yd2 from "./ui_Component_yd2";
+import ui_Component_yd3 from "./ui_Component_yd3";
 import ui_daoJuDisplay from "./ui_daoJuDisplay";
 import ui_Component132_1 from "./ui_Component132_1";
 import ui_Component_lc_challenge1 from "./ui_Component_lc_challenge1";
@@ -513,6 +516,9 @@ export default class gameBinder {
 		fgui.UIObjectFactory.setExtension(ui_againBtn.URL, ui_againBtn);
 		fgui.UIObjectFactory.setExtension(ui_Component118.URL, ui_Component118);
 		fgui.UIObjectFactory.setExtension(ui_Component119.URL, ui_Component119);
+		fgui.UIObjectFactory.setExtension(ui_Component_yd1.URL, ui_Component_yd1);
+		fgui.UIObjectFactory.setExtension(ui_Component_yd2.URL, ui_Component_yd2);
+		fgui.UIObjectFactory.setExtension(ui_Component_yd3.URL, ui_Component_yd3);
 		fgui.UIObjectFactory.setExtension(ui_daoJuDisplay.URL, ui_daoJuDisplay);
 		fgui.UIObjectFactory.setExtension(ui_Component132_1.URL, ui_Component132_1);
 		fgui.UIObjectFactory.setExtension(ui_Component_lc_challenge1.URL, ui_Component_lc_challenge1);

+ 21 - 0
client/laya/src/fgui/res/game/ui_Component_yd1.ts

@@ -0,0 +1,21 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+import ui_Component64 from "./ui_Component64";
+
+export default class ui_Component_yd1 extends fgui.GComponent {
+
+	public n83:fgui.GImage;
+	public fingerNode:ui_Component64;
+	public n84:fgui.GTextField;
+	public static URL:string = "ui://isxx5ak7uc2qv5b3";
+
+	public static createInstance():ui_Component_yd1 {
+		return <ui_Component_yd1>(fgui.UIPackage.createObject("game", "Component_yd1"));
+	}
+
+	protected onConstruct():void {
+		this.n83 = <fgui.GImage>(this.getChild("n83"));
+		this.fingerNode = <ui_Component64>(this.getChild("fingerNode"));
+		this.n84 = <fgui.GTextField>(this.getChild("n84"));
+	}
+}

+ 36 - 0
client/laya/src/fgui/res/game/ui_Component_yd2.ts

@@ -0,0 +1,36 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+import ui_Component114 from "./ui_Component114";
+import ui_Component64 from "./ui_Component64";
+
+export default class ui_Component_yd2 extends fgui.GComponent {
+
+	public n85:fgui.GImage;
+	public n86:fgui.GTextField;
+	public n77:ui_Component114;
+	public n79:ui_Component64;
+	public n80:fgui.GImage;
+	public n81:fgui.GTextField;
+	public n82:ui_Component114;
+	public n84:fgui.GImage;
+	public n87:fgui.GGroup;
+	public t0:fgui.Transition;
+	public static URL:string = "ui://isxx5ak7uc2qv5b5";
+
+	public static createInstance():ui_Component_yd2 {
+		return <ui_Component_yd2>(fgui.UIPackage.createObject("game", "Component_yd2"));
+	}
+
+	protected onConstruct():void {
+		this.n85 = <fgui.GImage>(this.getChild("n85"));
+		this.n86 = <fgui.GTextField>(this.getChild("n86"));
+		this.n77 = <ui_Component114>(this.getChild("n77"));
+		this.n79 = <ui_Component64>(this.getChild("n79"));
+		this.n80 = <fgui.GImage>(this.getChild("n80"));
+		this.n81 = <fgui.GTextField>(this.getChild("n81"));
+		this.n82 = <ui_Component114>(this.getChild("n82"));
+		this.n84 = <fgui.GImage>(this.getChild("n84"));
+		this.n87 = <fgui.GGroup>(this.getChild("n87"));
+		this.t0 = this.getTransition("t0");
+	}
+}

+ 27 - 0
client/laya/src/fgui/res/game/ui_Component_yd3.ts

@@ -0,0 +1,27 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+import ui_Component114 from "./ui_Component114";
+
+export default class ui_Component_yd3 extends fgui.GComponent {
+
+	public n87:fgui.GImage;
+	public n88:fgui.GTextField;
+	public n84:ui_Component114;
+	public n85:fgui.GImage;
+	public n86:fgui.GGroup;
+	public t0:fgui.Transition;
+	public static URL:string = "ui://isxx5ak7uc2qv5b6";
+
+	public static createInstance():ui_Component_yd3 {
+		return <ui_Component_yd3>(fgui.UIPackage.createObject("game", "Component_yd3"));
+	}
+
+	protected onConstruct():void {
+		this.n87 = <fgui.GImage>(this.getChild("n87"));
+		this.n88 = <fgui.GTextField>(this.getChild("n88"));
+		this.n84 = <ui_Component114>(this.getChild("n84"));
+		this.n85 = <fgui.GImage>(this.getChild("n85"));
+		this.n86 = <fgui.GGroup>(this.getChild("n86"));
+		this.t0 = this.getTransition("t0");
+	}
+}

+ 9 - 0
client/laya/src/fgui/res/game/ui_UIGame.ts

@@ -28,6 +28,9 @@ import ui_Component113 from "./ui_Component113";
 import ui_Component115 from "./ui_Component115";
 import ui_Component117 from "./ui_Component117";
 import ui_Component146 from "./ui_Component146";
+import ui_Component_yd1 from "./ui_Component_yd1";
+import ui_Component_yd2 from "./ui_Component_yd2";
+import ui_Component_yd3 from "./ui_Component_yd3";
 
 export default class ui_UIGame extends fgui.GComponent {
 
@@ -78,6 +81,9 @@ export default class ui_UIGame extends fgui.GComponent {
 	public guide1:ui_Component115;
 	public guide3:ui_Component117;
 	public guideNode:ui_Component146;
+	public n_lxms_yd1:ui_Component_yd1;
+	public n_lxms_yd2:ui_Component_yd2;
+	public n_lxms_yd3:ui_Component_yd3;
 	public static URL:string = "ui://isxx5ak7kt443qg";
 
 	public static createInstance():ui_UIGame {
@@ -132,5 +138,8 @@ export default class ui_UIGame extends fgui.GComponent {
 		this.guide1 = <ui_Component115>(this.getChild("guide1"));
 		this.guide3 = <ui_Component117>(this.getChild("guide3"));
 		this.guideNode = <ui_Component146>(this.getChild("guideNode"));
+		this.n_lxms_yd1 = <ui_Component_yd1>(this.getChild("n_lxms_yd1"));
+		this.n_lxms_yd2 = <ui_Component_yd2>(this.getChild("n_lxms_yd2"));
+		this.n_lxms_yd3 = <ui_Component_yd3>(this.getChild("n_lxms_yd3"));
 	}
 }

+ 50 - 3
client/laya/src/game/GameMgr.ts

@@ -161,7 +161,7 @@ export default class GameMgr {
         this.clearTime();
         //
         // this.isSelfOutSkills = false;
-         this.aiPlayedBreakArmy = false;
+        this.aiPlayedBreakArmy = false;
         //
         this.isBlackInHole = false;
         this.placeBallPosData = {};
@@ -187,6 +187,7 @@ export default class GameMgr {
         }
         xGame.common.gameUI.setTurnAlpha(this.selfTurn);
         this.checkGuide();
+        this.checkGuideForPlaceBall();
         //高低杆重置
         if (xGame.common.uiRodMethod) xGame.common.uiRodMethod.resetRod();
         //辅助线
@@ -285,6 +286,7 @@ export default class GameMgr {
         this.firstShoot = true;
     }
     checkGuide() {
+        console.log('zh: 检查引导123')
         let guide = DataMgr.getSkillGuide();
         let gameUI = xGame.common.gameUI.ui;
         gameUI.guide1.visible = false;
@@ -302,6 +304,33 @@ export default class GameMgr {
         gameUI.guide1.fingerNode.x = oneBall.gameObj.x;
         gameUI.guide1.fingerNode.y = oneBall.gameObj.y;
     }
+    /**
+     * 练习模式的引导   placeBall模式250801 zh
+     * @returns 
+     */
+    checkGuideForPlaceBall() {
+        console.log('zh: 检查引导123 checkGuideForPlaceBall')
+        let gameUI = xGame.common.gameUI.ui;
+        let guide = DataMgr.getLianXiGuide();
+        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 {
+            gameUI.n_lxms_yd1.visible = false;
+            return;
+        }
+        //////
+        let oneBall = this.getOneBallForPlaceBall();
+        gameUI.n_lxms_yd1.visible = true;
+        gameUI.n_lxms_yd1.fingerNode.x = oneBall.gameObj.x;
+        gameUI.n_lxms_yd1.fingerNode.y = oneBall.gameObj.y;
+    }
+
+
+
     getOneBall() {
         let arr = xGame.common.d2World.ballArr;
         for (let index = 0; index < arr.length; index++) {
@@ -309,6 +338,24 @@ export default class GameMgr {
             return arr[index];
         }
     }
+
+    /**
+     * 练习模式  即:placeBall模式下的第2个球 ,因为默认第一个球已经瞄准好了
+     * 注意:练习模式下lev1 一共就2个球. 0=白球  1 已经默认瞄准  2=第二个球
+     * @returns 
+     */
+    getOneBallForPlaceBall() {
+        let arr = xGame.common.d2World.ballArr;
+        return arr[2];
+        // for (let index = 0; index < arr.length; index++) {
+        //     // if (arr[index].number == 0) {
+        //     //     continue;
+        //     // }
+        //     return arr[index];
+        // }
+    }
+
+
     updateSelfScore() {
         let ui = xGame.common.gameUI.ui.topNode;
         ui.selfScoreTxt.text = this.selfScore + "";
@@ -823,7 +870,7 @@ export default class GameMgr {
                 str = `You pocketed ${levelNum} extra balls`;
                 break;
             case SkillType.ice:
-                str = `${levelNum*2} extra balls were frozen`;
+                str = `${levelNum * 2} extra balls were frozen`;
                 break;
             case SkillType.fireworks:
                 str = `${levelNum} extra balls exploded `;
@@ -1065,7 +1112,7 @@ export default class GameMgr {
         //清除冰冻效果
         this.clearIceSkill();
         if (this.selfTurn) {
-           // console.log("zh:处理一杆结束后的逻辑  gameResult");
+            // console.log("zh:处理一杆结束后的逻辑  gameResult");
             PlatMgr.gameInsert();
         }
         //

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

@@ -193,10 +193,47 @@ export class UIGame extends UIBase {
 
         //console.log("持续播放");
         //xGame.soundMgr.playSound("bjyy1", 0);
-
+        this.yinDaoForLianxi();
         this.setGlobalFont(this.ui)
     }
 
+
+
+
+
+    /**
+     * 练习模式 引导  ,他给人家起名字是什么挑战模式
+     */
+    yinDaoForLianxi() {
+        let g = DataMgr.getSkillGuide();
+        if (g === 0) {
+            console.log('zh:默认的引导还没有完毕');
+            return;
+        }
+
+        let lianXiGuide = DataMgr.getLianXiGuide();
+        console.log('zh:lianXiGuide=', lianXiGuide);
+        if (lianXiGuide === 0) {
+            this.ui.n_lxms_yd1.visible = true;
+            console.log('zh:yinDaoForLianxi 111 set ok')
+            // let x = this.ui.myNode.startBtn.x;
+            // let y = this.ui.myNode.startBtn.y;
+            // this.ui.n_yd_zzq_btn.x = x;
+            // this.ui.n_yd_zzq_btn.y = y;
+            // let x1 = this.ui.myNode.x;
+            // let y1 = this.ui.myNode.y;
+            // this.ui.n_lc3.x = x1;
+            // this.ui.n_lc3.y = y1;
+
+        } else {
+            this.ui.n_lxms_yd1.visible = false;
+            console.log('zh:无需引导11')
+        }
+        DataMgr.setLianXiGuide(0);
+    }
+
+
+
     public updateSelf() {
         //如果是大招模式随机一个关卡
         if (xGame.common.gameMode == GameMode.classic) {
@@ -216,6 +253,7 @@ export class UIGame extends UIBase {
             xGame.common.bigMoveLevelIndex = rand;
         }
         else if (xGame.common.gameMode == GameMode.placeBall) {
+            console.log('zh:练习模式...')
             let data: cfgTable.placeball = cfgTable.placeballData[xGame.common.placeBallCurLevel];
             this.ui.c1.selectedIndex = 1 + data.type;
             this.ui.alpha = 1;
@@ -482,6 +520,7 @@ export class UIGame extends UIBase {
                 let h = ruler1.height;
                 //
                 this.checkGuide();
+                this.checkGuideForLxms();
                 //
                 this.isMoveRod = true;
                 //
@@ -541,6 +580,7 @@ export class UIGame extends UIBase {
                     xGame.common.d2World.d2Gan.shoot();
                     xGame.common.d2World.d2HelpLine.shoot();
                     this.finishGuide();
+                    this.finishGuideForLxms();
                     this.ui.powerEft.visible = false;
                     this.ui.colorNode.visible = false;
                     //播放击打白球时候的杆音效
@@ -612,6 +652,20 @@ export class UIGame extends UIBase {
 
         }
     }
+    //练习模式的引导,滑动右侧的尺子
+    checkGuideForLxms() {
+        let guide = DataMgr.getLianXiGuide();
+        // this.closeAllGuide();
+        if (guide == 0 && xGame.common.gameMode == GameMode.placeBall && xGame.common.guideStepForLianXi == 2) {
+            xGame.common.gameUI.ui.n_lxms_yd2.visible = false;
+            xGame.common.gameUI.ui.n_lxms_yd3.visible = true;
+            xGame.common.guideStepForLianXi = 3
+
+        }
+    }
+
+
+
     finishGuide() {
         let guide = DataMgr.getSkillGuide();
         if (guide == 0 && xGame.common.gameMode == GameMode.bigMove) {
@@ -622,11 +676,27 @@ export class UIGame extends UIBase {
             JSBridgeUtils.instance.logEventForAdNoParams("tutorial_complete");
         }
     }
+    finishGuideForLxms() {
+        let guide = DataMgr.getLianXiGuide();
+        if (guide == 0 && xGame.common.gameMode == GameMode.placeBall) {
+            xGame.common.guideStepForLianXi = 3;
+            DataMgr.setLianXiGuide(1);
+            this.closeAllGuideForLxms();
+            console.log('zh: lxms新手引导完毕');
+            //事件埋点 
+            JSBridgeUtils.instance.logEventForAdNoParams("tutorial_complete");
+        }
+    }
     closeAllGuide() {
         xGame.common.gameUI.ui.guide1.visible = false;
         xGame.common.gameUI.ui.guide2.visible = false;
         xGame.common.gameUI.ui.guide3.visible = false;
     }
+    closeAllGuideForLxms() {
+        xGame.common.gameUI.ui.n_lxms_yd1.visible = false;
+        xGame.common.gameUI.ui.n_lxms_yd2.visible = false;
+        xGame.common.gameUI.ui.n_lxms_yd3.visible = false;
+    }
     /**更新蓄力值 */
     updateBarInfo() {
         let star = this.ui.powerNode.y;

+ 10 - 11
client/laya/src/ui/UILevelProp.ts

@@ -83,30 +83,21 @@ export default class UILevelProp extends UIBase {
         let lianXiGuide = DataMgr.getLianXiGuide();
         console.log('zh:lianXiGuide=', lianXiGuide);
         if (lianXiGuide === 0) {
-
             this.ui.myNode.n_yd_3.visible = true;
             console.log('zh:yinDaoForLianxi 333 set ok')
             // let x = this.ui.myNode.startBtn.x;
             // let y = this.ui.myNode.startBtn.y;
             // this.ui.n_yd_zzq_btn.x = x;
             // this.ui.n_yd_zzq_btn.y = y;
-
-
             // let x1 = this.ui.myNode.x;
             // let y1 = this.ui.myNode.y;
             // this.ui.n_lc3.x = x1;
             // this.ui.n_lc3.y = y1;
-
-
-
-
-
-
         } else {
             this.ui.myNode.n_yd_3.visible = false;
             console.log('zh:无需引导33')
         }
-        DataMgr.setLianXiGuide(0);
+
     }
 
 
@@ -222,7 +213,15 @@ export default class UILevelProp extends UIBase {
             console.log('zh:eeeee')
         }
         else {
-            console.log('zh:powerEnough 不足 =' + DataMgr.powerEnough());
+            let guide = DataMgr.getLianXiGuide();
+            if (guide == 0 && xGame.common.gameMode == GameMode.placeBall) {
+                console.log('zh:自动添加2点体力,以便于完成练习引导模式')
+                DataMgr.setPower(2);
+            }
+            console.log('zh:guide = ' + guide)
+            console.log('zh:xGame.common.gameMode = ' + xGame.common.gameMode)
+
+            console.log('zh:powerEnough不足=' + DataMgr.powerEnough());
             xGame.uiMgr.Show(UIPower);
         }
     }

+ 3 - 0
client/laya/src/utils/Common.ts

@@ -113,6 +113,9 @@ export default class Common {
     maxShareDiamondTimes: number = 3;
     //uigame界面中guide步骤
     guideStep: number = 0;
+    //练习模式指引步骤
+    guideStepForLianXi: number = 0;
+
     temSelfLevel = 0;//新手引导下玩家的技能等级
     extraMoveNum = 0;//大招模式额外移动量,
     ///

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff