Преглед изворни кода

开始加入自定义引导

dzduole пре 1 дан
родитељ
комит
8871a577a2

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


+ 54 - 1
client/laya/bin/js/bundle.js

@@ -4643,6 +4643,10 @@
             this.talkNode = (this.getChild("talkNode"));
             this.n83 = (this.getChild("n83"));
             this.n84 = (this.getChild("n84"));
+            this.n_yd_challenge_1_mask = (this.getChild("n_yd_challenge_1_mask"));
+            this.n_yd_challenge_1_btn = (this.getChild("n_yd_challenge_1_btn"));
+            this.n_yd_challenge_1_hand = (this.getChild("n_yd_challenge_1_hand"));
+            this.n_yd_challenge_1 = (this.getChild("n_yd_challenge_1"));
             this.n_moni_pay_ok = (this.getChild("n_moni_pay_ok"));
         }
     }
@@ -7759,6 +7763,7 @@
             this.addUIClick(this.ui.drawBtn, this.openDrawView);
             this.addUIClick(this.ui.rankBtn, this.openRanking);
             this.addUIClick(this.ui.n73, this.startGame, [GameMode.bigMove]);
+            this.addUIClick(this.ui.n_yd_challenge_1_btn, this.startPlaceBall);
             this.addUIClick(this.ui.n_dengLu, this.gotoLogin);
             this.addUIClick(this.ui.n_moni_pay_ok, this.start_debug_for_moni_payOk);
         }
@@ -7810,6 +7815,16 @@
             }
             this.setGlobalFont(this.ui);
         }
+        yinDaoForLianxi() {
+            let x = this.ui.placeBallBtn.x;
+            let y = this.ui.placeBallBtn.y;
+            this.ui.n_yd_challenge_1.visible = true;
+            this.ui.n_yd_challenge_1_hand.x = x + 150;
+            this.ui.n_yd_challenge_1_hand.y = y;
+            this.ui.n_yd_challenge_1_btn.x = x;
+            this.ui.n_yd_challenge_1_btn.y = y;
+            console.log('zh:yinDaoForLianxi set ok');
+        }
         showTipForGuest() {
             let userInfo = LocalStorageManager.getItem(keyForLoginInfo);
             if (userInfo == null) {
@@ -15970,6 +15985,31 @@
     }
     ui_Component132_1.URL = "ui://isxx5ak7uih8v568";
 
+    class ui_Component_lc_challenge1 extends fgui.GComponent {
+        static createInstance() {
+            return (fgui.UIPackage.createObject("game", "Component_lc_challenge1"));
+        }
+        onConstruct() {
+            this.n0 = (this.getChild("n0"));
+            this.n1_bai = (this.getChild("n1_bai"));
+        }
+    }
+    ui_Component_lc_challenge1.URL = "ui://isxx5ak7um3xv5as";
+
+    class ui_Component_shou extends fgui.GComponent {
+        static createInstance() {
+            return (fgui.UIPackage.createObject("game", "Component_shou"));
+        }
+        onConstruct() {
+            this.n57 = (this.getChild("n57"));
+            this.n54 = (this.getChild("n54"));
+            this.n55 = (this.getChild("n55"));
+            this.n56 = (this.getChild("n56"));
+            this.t1 = this.getTransition("t1");
+        }
+    }
+    ui_Component_shou.URL = "ui://isxx5ak7um3xv5aw";
+
     class ui_SecretaryDisplay extends fgui.GComponent {
         static createInstance() {
             return (fgui.UIPackage.createObject("game", "SecretaryDisplay"));
@@ -16897,6 +16937,8 @@
             fgui.UIObjectFactory.setExtension(ui_Component119.URL, ui_Component119);
             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);
+            fgui.UIObjectFactory.setExtension(ui_Component_shou.URL, ui_Component_shou);
             fgui.UIObjectFactory.setExtension(ui_SecretaryDisplay.URL, ui_SecretaryDisplay);
             fgui.UIObjectFactory.setExtension(ui_BallRodDisplay.URL, ui_BallRodDisplay);
             fgui.UIObjectFactory.setExtension(ui_UIAddCoin.URL, ui_UIAddCoin);
@@ -19354,7 +19396,7 @@
             let reqData = xGame.httpMgr.getReqData();
             xGame.httpMgr.sendPost2025('order/getOrderListForNoChongFuBuy', reqData, (res) => {
                 try {
-                    console.log('zh:loadUserSpOrderForAd res = ' + JSON.stringify(res));
+                    console.log('zh:getOrderListForNoChongFuBuy res = ' + JSON.stringify(res));
                     let code = res.code;
                     let msg = res.msg;
                     if (code == 401) {
@@ -24930,6 +24972,7 @@
             this.addUIClick(this.ui.drawBtn, this.openDrawView);
             this.addUIClick(this.ui.rankBtn, this.openRanking);
             this.addUIClick(this.ui.n73, this.startGame, [GameMode.bigMove]);
+            this.addUIClick(this.ui.n_yd_challenge_1_btn, this.startPlaceBall);
             this.addUIClick(this.ui.n_dengLu, this.gotoLogin);
             this.addUIClick(this.ui.n_moni_pay_ok, this.start_debug_for_moni_payOk);
         }
@@ -24981,6 +25024,16 @@
             }
             this.setGlobalFont(this.ui);
         }
+        yinDaoForLianxi() {
+            let x = this.ui.placeBallBtn.x;
+            let y = this.ui.placeBallBtn.y;
+            this.ui.n_yd_challenge_1.visible = true;
+            this.ui.n_yd_challenge_1_hand.x = x + 150;
+            this.ui.n_yd_challenge_1_hand.y = y;
+            this.ui.n_yd_challenge_1_btn.x = x;
+            this.ui.n_yd_challenge_1_btn.y = y;
+            console.log('zh:yinDaoForLianxi set ok');
+        }
         showTipForGuest() {
             let userInfo = LocalStorageManager.getItem(keyForLoginInfo);
             if (userInfo == null) {

Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
client/laya/bin/js/bundle.js.map


+ 4 - 1
client/laya/src/data/Data.ts

@@ -33,7 +33,10 @@ export class UserData {
     public coin: number = 4000;//金币
     public diamond: number = 0;//钻石
     public skillSuccessTimes = 0;//大招模式连胜次数
-    public skillGuide: number = 0;//大招模式新手引导
+    /**
+     * 大招模式新手引导
+     */
+    public skillGuide: number = 0;
     public skillAccTimes = 0;//大招模式累计胜利次数
     //摆球达人关卡通关情况
     public placeBallData: Array<any> = [];

+ 11 - 2
client/laya/src/data/DataMgr.ts

@@ -438,13 +438,22 @@ export default class DataMgr {
         this.userData.skillAccTimes += val;
         this.saveUserData();
     }
-    //
+    
+
+    /**
+     *  大招模式新手引导
+     * @returns 1: 关闭 0: 开启
+     */
     public static getSkillGuide() {
         if (!xGame.common.openGuide) {
             return 1;
         }
         return this.userData.skillGuide;
     }
+    /**
+     * 
+     * @param val 1: 关闭 0: 开启
+     */
     public static setSkillGuide(val) {
         this.userData.skillGuide = val;
         this.saveUserData();
@@ -966,7 +975,7 @@ export default class DataMgr {
         let reqData = xGame.httpMgr.getReqData();
         xGame.httpMgr.sendPost2025('order/getOrderListForNoChongFuBuy', reqData, (res) => {
             try {
-                console.log('zh:loadUserSpOrderForAd res = ' + JSON.stringify(res))
+                console.log('zh:getOrderListForNoChongFuBuy res = ' + JSON.stringify(res))
                 let code = res.code;
                 let msg = res.msg;
                 if (code == 401) {

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

@@ -227,6 +227,8 @@ import ui_Component118 from "./ui_Component118";
 import ui_Component119 from "./ui_Component119";
 import ui_daoJuDisplay from "./ui_daoJuDisplay";
 import ui_Component132_1 from "./ui_Component132_1";
+import ui_Component_lc_challenge1 from "./ui_Component_lc_challenge1";
+import ui_Component_shou from "./ui_Component_shou";
 import ui_SecretaryDisplay from "./ui_SecretaryDisplay";
 import ui_BallRodDisplay from "./ui_BallRodDisplay";
 import ui_UIAddCoin from "./ui_UIAddCoin";
@@ -505,6 +507,8 @@ export default class gameBinder {
 		fgui.UIObjectFactory.setExtension(ui_Component119.URL, ui_Component119);
 		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);
+		fgui.UIObjectFactory.setExtension(ui_Component_shou.URL, ui_Component_shou);
 		fgui.UIObjectFactory.setExtension(ui_SecretaryDisplay.URL, ui_SecretaryDisplay);
 		fgui.UIObjectFactory.setExtension(ui_BallRodDisplay.URL, ui_BallRodDisplay);
 		fgui.UIObjectFactory.setExtension(ui_UIAddCoin.URL, ui_UIAddCoin);

+ 17 - 0
client/laya/src/fgui/res/game/ui_Component_lc_challenge1.ts

@@ -0,0 +1,17 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+export default class ui_Component_lc_challenge1 extends fgui.GComponent {
+
+	public n0:fgui.GGraph;
+	public n1_bai:fgui.GImage;
+	public static URL:string = "ui://isxx5ak7um3xv5as";
+
+	public static createInstance():ui_Component_lc_challenge1 {
+		return <ui_Component_lc_challenge1>(fgui.UIPackage.createObject("game", "Component_lc_challenge1"));
+	}
+
+	protected onConstruct():void {
+		this.n0 = <fgui.GGraph>(this.getChild("n0"));
+		this.n1_bai = <fgui.GImage>(this.getChild("n1_bai"));
+	}
+}

+ 23 - 0
client/laya/src/fgui/res/game/ui_Component_shou.ts

@@ -0,0 +1,23 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+export default class ui_Component_shou extends fgui.GComponent {
+
+	public n57:fgui.GImage;
+	public n54:fgui.GImage;
+	public n55:fgui.GImage;
+	public n56:fgui.GImage;
+	public t1:fgui.Transition;
+	public static URL:string = "ui://isxx5ak7um3xv5aw";
+
+	public static createInstance():ui_Component_shou {
+		return <ui_Component_shou>(fgui.UIPackage.createObject("game", "Component_shou"));
+	}
+
+	protected onConstruct():void {
+		this.n57 = <fgui.GImage>(this.getChild("n57"));
+		this.n54 = <fgui.GImage>(this.getChild("n54"));
+		this.n55 = <fgui.GImage>(this.getChild("n55"));
+		this.n56 = <fgui.GImage>(this.getChild("n56"));
+		this.t1 = this.getTransition("t1");
+	}
+}

+ 10 - 0
client/laya/src/fgui/res/game/ui_UIMain.ts

@@ -21,6 +21,8 @@ import ui_Component112 from "./ui_Component112";
 import ui_Component60 from "./ui_Component60";
 import ui_dh_zuanshi from "./ui_dh_zuanshi";
 import ui_Component141 from "./ui_Component141";
+import ui_Component_lc_challenge1 from "./ui_Component_lc_challenge1";
+import ui_Component_shou from "./ui_Component_shou";
 import ui_Component1_debug_pay_ok from "./ui_Component1_debug_pay_ok";
 
 export default class ui_UIMain extends fgui.GComponent {
@@ -57,6 +59,10 @@ export default class ui_UIMain extends fgui.GComponent {
 	public talkNode:ui_Component60;
 	public n83:ui_dh_zuanshi;
 	public n84:ui_Component141;
+	public n_yd_challenge_1_mask:ui_Component_lc_challenge1;
+	public n_yd_challenge_1_btn:fgui.GLoader;
+	public n_yd_challenge_1_hand:ui_Component_shou;
+	public n_yd_challenge_1:fgui.GGroup;
 	public n_moni_pay_ok:ui_Component1_debug_pay_ok;
 	public static URL:string = "ui://isxx5ak7kt443qc";
 
@@ -97,6 +103,10 @@ export default class ui_UIMain extends fgui.GComponent {
 		this.talkNode = <ui_Component60>(this.getChild("talkNode"));
 		this.n83 = <ui_dh_zuanshi>(this.getChild("n83"));
 		this.n84 = <ui_Component141>(this.getChild("n84"));
+		this.n_yd_challenge_1_mask = <ui_Component_lc_challenge1>(this.getChild("n_yd_challenge_1_mask"));
+		this.n_yd_challenge_1_btn = <fgui.GLoader>(this.getChild("n_yd_challenge_1_btn"));
+		this.n_yd_challenge_1_hand = <ui_Component_shou>(this.getChild("n_yd_challenge_1_hand"));
+		this.n_yd_challenge_1 = <fgui.GGroup>(this.getChild("n_yd_challenge_1"));
 		this.n_moni_pay_ok = <ui_Component1_debug_pay_ok>(this.getChild("n_moni_pay_ok"));
 	}
 }

+ 31 - 3
client/laya/src/ui/UIMain.ts

@@ -352,7 +352,13 @@ export default class UIMain extends UIBase {
         this.addUIClick(this.ui.rankBtn, this.openRanking);
 
         //那個小手
-        this.addUIClick(this.ui.n73,this.startGame, [GameMode.bigMove]);
+        this.addUIClick(this.ui.n73, this.startGame, [GameMode.bigMove]);
+
+        ///练习模式的引导start
+        this.addUIClick(this.ui.n_yd_challenge_1_btn, this.startPlaceBall);
+
+
+
 
         //退出登录
         this.addUIClick(this.ui.n_dengLu, this.gotoLogin);
@@ -401,7 +407,7 @@ export default class UIMain extends UIBase {
         // }, 2000);
 
 
-        //
+    
         this.showGuide();
         this.ui.guideBtn.x = this.ui.liucheng2.myMask.x;
         this.ui.guideBtn.y = this.ui.liucheng2.myMask.y;
@@ -437,9 +443,31 @@ export default class UIMain extends UIBase {
         }
 
         this.setGlobalFont(this.ui)
+
+
+       // this.yinDaoForLianxi();
     }
 
 
+    /**
+     * 练习模式 引导  ,他给人家起名字是什么挑战模式
+     */
+    yinDaoForLianxi() {
+        let x = this.ui.placeBallBtn.x;
+        let y = this.ui.placeBallBtn.y;
+
+        this.ui.n_yd_challenge_1.visible = true;
+
+        this.ui.n_yd_challenge_1_hand.x = x + 150;
+        this.ui.n_yd_challenge_1_hand.y = y;
+        this.ui.n_yd_challenge_1_btn.x = x;
+        this.ui.n_yd_challenge_1_btn.y = y;
+        console.log('zh:yinDaoForLianxi set ok')
+
+    }
+
+
+
     showTipForGuest() {
         let userInfo = LocalStorageManager.getItem(keyForLoginInfo);
         if (userInfo == null) {
@@ -481,7 +509,7 @@ export default class UIMain extends UIBase {
         this.ui.secretaryGuide.visible = false;
         this.ui.enterGuide.visible = true;
         this.ui.wordsNode.t0.play();
-        
+
         //todo
         if (DataMgr.getNewUser()) Moyu.sendDataEvent("gameReady");
     }

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

@@ -52,6 +52,9 @@ export default class Common {
     //
     posV4 = new Laya.Vector4();
     showDebug: boolean = false;
+    /**
+     * 打开指导
+     */
     openGuide: boolean = true;
     //
     screenImg: Laya.Texture;

Неке датотеке нису приказане због велике количине промена