dzduole 4 天之前
父節點
當前提交
ab7b71d581

二進制
art/fgui/assets/game/UIMain/asset/new2025/yasuoDir/qd_bg.jpg


+ 3 - 3
art/fgui/assets/game/UISecretary/UIFuli/component/Component_fl_1.xml

@@ -5,9 +5,9 @@
     <text id="n6_im8n" name="n6" xy="349,187" size="203,42" fontSize="30" color="#ffffff" autoSize="none" bold="true" text="Privilege 1:"/>
     <text id="n7_im8n" name="n7" xy="349,294" size="202,42" fontSize="30" color="#ffffff" autoSize="none" bold="true" text="Privilege 2:"/>
     <text id="n8_im8n" name="n8" xy="349,348" size="201,42" fontSize="30" color="#ffffff" autoSize="none" bold="true" text="Privilege 3:"/>
-    <text id="n5_im8n" name="n5" xy="572,187" size="366,101" touchable="false" fontSize="30" color="#ffff00" autoSize="none" bold="true" strokeColor="#000000" text="Remove interstitial ads and banner ad" input="true"/>
-    <text id="n9_im8n" name="n9" xy="572,294" size="365,43" touchable="false" fontSize="30" color="#ffff00" autoSize="none" bold="true" strokeColor="#000000" text="We&apos;ll give away a club" input="true"/>
-    <text id="n10_im8n" name="n10" xy="572,348" size="355,43" touchable="false" fontSize="30" color="#ffff00" autoSize="none" bold="true" strokeColor="#000000" text="500 diamond" input="true"/>
+    <text id="n5_im8n" name="n5" xy="572,187" size="458,101" touchable="false" fontSize="30" color="#ffff00" autoSize="none" bold="true" strokeColor="#000000" strokeSize="2" text="Remove interstitial ads &#xA;and banner ad" input="true"/>
+    <text id="n9_im8n" name="n9" xy="572,294" size="365,43" touchable="false" fontSize="30" color="#ffff00" autoSize="none" bold="true" strokeColor="#000000" strokeSize="2" text="We&apos;ll give away a club" input="true"/>
+    <text id="n10_im8n" name="n10" xy="572,348" size="355,43" touchable="false" fontSize="30" color="#ffff00" autoSize="none" bold="true" strokeColor="#000000" strokeSize="2" text="500 diamond" input="true"/>
     <text id="n11_im8n" name="txt_price" xy="616,396" size="102,66" fontSize="50" color="#fefefe" bold="true" strokeColor="#d62c20" strokeSize="3" text="4.99"/>
     <component id="n12_loyp" name="n_no" src="loypv59r" fileName="UISecretary/UIFuli/component/Button_h.xml" xy="372,470"/>
     <component id="n13_loyp" name="n_buy" src="loypv59s" fileName="UISecretary/UIFuli/component/Button_lv.xml" xy="790,470"/>

+ 3 - 3
art/fgui/assets/game/UISecretary/UIFuli/component/Component_fl_2.xml

@@ -6,9 +6,9 @@
     <text id="n4_im8n" name="n4" xy="417,206" size="199,42" fontSize="30" color="#ffffff" autoSize="none" bold="true" text="Privilege 1:"/>
     <text id="n6_im8n" name="n6" xy="417,282" size="200,42" fontSize="30" color="#ffffff" autoSize="none" bold="true" text="Privilege 2:"/>
     <text id="n7_im8n" name="n7" xy="417,340" size="199,42" fontSize="30" color="#ffffff" autoSize="none" bold="true" text="Privilege 3:"/>
-    <text id="n5_im8n" name="n5" xy="632,206" size="366,49" touchable="false" fontSize="30" color="#ffff00" autoSize="none" bold="true" strokeColor="#000000" text="Play all modes for free" input="true"/>
-    <text id="n8_im8n" name="n8" xy="632,282" size="366,49" touchable="false" fontSize="30" color="#ffff00" autoSize="none" bold="true" strokeColor="#000000" text="3000 diamond" input="true"/>
-    <text id="n9_im8n" name="n9" xy="632,340" size="366,49" touchable="false" fontSize="30" color="#ffff00" autoSize="none" bold="true" strokeColor="#000000" text="No ads at all" input="true"/>
+    <text id="n5_im8n" name="n5" xy="632,206" size="366,49" touchable="false" fontSize="30" color="#ffff00" autoSize="none" bold="true" strokeColor="#000000" strokeSize="2" text="Play all modes for free" input="true"/>
+    <text id="n8_im8n" name="n8" xy="632,282" size="366,49" touchable="false" fontSize="30" color="#ffff00" autoSize="none" bold="true" strokeColor="#000000" strokeSize="2" text="3000 diamond" input="true"/>
+    <text id="n9_im8n" name="n9" xy="632,340" size="366,49" touchable="false" fontSize="30" color="#ffff00" autoSize="none" bold="true" strokeColor="#000000" strokeSize="2" text="No ads at all" input="true"/>
     <component id="n10_loyp" name="n_no" src="loypv59r" fileName="UISecretary/UIFuli/component/Button_h.xml" xy="372,470"/>
     <component id="n11_loyp" name="n_buy" src="loypv59s" fileName="UISecretary/UIFuli/component/Button_lv.xml" xy="790,470"/>
   </displayList>

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

@@ -8,7 +8,7 @@
     <graph id="n41_s46i" name="n41" xy="0,0" size="56,131" alpha="0.1" type="rect" lineSize="0" fillColor="#ff000000">
       <gearDisplay controller="c1" pages="1"/>
     </graph>
-    <text id="n40_qlo0" name="n40" xy="12,4" size="31,123" font="ui://isxx5ak7d33kv57a" fontSize="22" color="#c26541" align="center" vAlign="middle" leading="0" autoSize="none" bold="true" text="I&#xA;T&#xA;E&#xA;M">
+    <text id="n40_qlo0" name="n40" xy="12,1" size="31,129" fontSize="15" color="#c26541" align="center" vAlign="middle" leading="0" autoSize="none" bold="true" text="D&#xA;I&#xA;A&#xA;M&#xA;O&#xA;N&#xA;D">
       <gearColor controller="c1" pages="1" values="#ffffff,#000000" default="#c26541,#000000"/>
     </text>
   </displayList>

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

@@ -8,7 +8,7 @@
     <graph id="n41_s46i" name="n41" xy="0,0" size="56,131" alpha="0.1" type="rect" lineSize="0">
       <gearDisplay controller="c1" pages="1"/>
     </graph>
-    <text id="n40_qlo0" name="n40" xy="12,5" size="31,120" fontSize="22" color="#ffffff" align="center" leading="0" autoSize="none" bold="true" text="C&#xA;U&#xA;E">
+    <text id="n40_qlo0" name="n40" xy="12,5" size="31,120" fontSize="15" color="#ffffff" align="center" leading="0" autoSize="none" bold="true" text="C&#xA;U&#xA;E">
       <gearColor controller="c1" pages="0,1" values="#ffffff,#000000|#ffffff,#000000"/>
     </text>
   </displayList>

二進制
client/laya/bin/asset/fgui/game.obj


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

@@ -854,7 +854,7 @@
 
     class HttpMgr {
         constructor() {
-            this.isDev = true;
+            this.isDev = false;
             HttpMgr._instance = this;
         }
         static getInstance() {
@@ -6145,7 +6145,7 @@
         show(type) {
             super.show();
             this.curType = type == 0 ? "qiugan" : "daoju";
-            this.switchBtn("qiugan");
+            this.switchBtn("");
             this.playSecretaryIdle();
             this.updateBallRod();
         }
@@ -7601,6 +7601,17 @@
             }
             JSBridgeUtils.instance.loginOutForApp();
             this.setUserDefaultNickname();
+            DataMgr.setCoin2(4000);
+            DataMgr.setDiamond2(0);
+            this.setDefaultQiuGanInfo();
+        }
+        setDefaultQiuGanInfo() {
+            DataMgr.setBallRod(0, 1);
+            DataMgr.setBallRod(1, 0);
+            DataMgr.setBallRod(2, 0);
+            DataMgr.setBallRod(3, 0);
+            DataMgr.setBallRod(4, 0);
+            DataMgr.setBallRod(5, 1);
         }
         setUserDefaultNickname() {
             let defUsername = "player";
@@ -8032,6 +8043,11 @@
                 Moyu.initUser(this, this.freshUser, force);
             }
             this.freshUser();
+            console.log('zh:5秒后更新用戶資產信息');
+            setTimeout(() => {
+                console.log('setTimeout 5秒over 執行');
+                DataMgr.getUserZiChanInfo();
+            }, 5000);
         }
         event_login_in() {
             console.log("zh:event_login_in被触发");
@@ -18720,6 +18736,14 @@
             xGame.eventMgr.event(COIN_CHANGE);
             this.updateUserInfo2Server("jb");
         }
+        static setCoin2(val) {
+            if (typeof val != "number") {
+                return;
+            }
+            this.userData.coin = val;
+            this.saveUserData();
+            xGame.eventMgr.event(COIN_CHANGE);
+        }
         static setCoinFormServer(val) {
             if (typeof val != "number") {
                 return;
@@ -18747,6 +18771,14 @@
             xGame.eventMgr.event(DIAMOND_CHANGE);
             this.updateUserInfo2Server("zs");
         }
+        static setDiamond2(val) {
+            if (typeof val != "number") {
+                return;
+            }
+            this.userData.diamond = val;
+            this.saveUserData();
+            xGame.eventMgr.event(DIAMOND_CHANGE);
+        }
         static setDiamondFormServer(val) {
             if (typeof val != "number") {
                 return;
@@ -18891,6 +18923,7 @@
             this.saveUserData();
         }
         static setBallRodFormServer(haveQiuGanJsonStr) {
+            console.log('zh:haveQiuGanJsonStr = ' + haveQiuGanJsonStr);
             if (!haveQiuGanJsonStr) {
                 console.log("setBallRodFormServer数据为空或未定义");
                 return;
@@ -18901,13 +18934,9 @@
                 let v = haveQiuGanJsonObj[key];
                 let k = parseInt(key);
                 let idx = k - 1;
-                console.log('zh:更新IDX = ' + idx);
+                console.log('zh:开始更新IDX = ' + idx);
                 console.log('this.userData.ballRod[idx]===' + this.userData.ballRod[idx]);
-                if (this.userData.ballRod[idx] === 0) {
-                    console.log('zh: uuuuu  ' + (k - 1));
-                    this.userData.ballRod[k - 1] = 1;
-                    this.saveUserData();
-                }
+                this.userData.ballRod[idx] = v;
             });
         }
         static getCurBallRod() {
@@ -23370,7 +23399,7 @@
         show(type) {
             super.show();
             this.curType = type == 0 ? "qiugan" : "daoju";
-            this.switchBtn("qiugan");
+            this.switchBtn("");
             this.playSecretaryIdle();
             this.updateBallRod();
         }
@@ -24519,6 +24548,17 @@
             }
             JSBridgeUtils.instance.loginOutForApp();
             this.setUserDefaultNickname();
+            DataMgr.setCoin2(4000);
+            DataMgr.setDiamond2(0);
+            this.setDefaultQiuGanInfo();
+        }
+        setDefaultQiuGanInfo() {
+            DataMgr.setBallRod(0, 1);
+            DataMgr.setBallRod(1, 0);
+            DataMgr.setBallRod(2, 0);
+            DataMgr.setBallRod(3, 0);
+            DataMgr.setBallRod(4, 0);
+            DataMgr.setBallRod(5, 1);
         }
         setUserDefaultNickname() {
             let defUsername = "player";
@@ -24950,6 +24990,11 @@
                 Moyu.initUser(this, this.freshUser, force);
             }
             this.freshUser();
+            console.log('zh:5秒后更新用戶資產信息');
+            setTimeout(() => {
+                console.log('setTimeout 5秒over 執行');
+                DataMgr.getUserZiChanInfo();
+            }, 5000);
         }
         event_login_in() {
             console.log("zh:event_login_in被触发");

文件差異過大導致無法顯示
+ 0 - 0
client/laya/bin/js/bundle.js.map


二進制
client/laya/bin/res/qd_bg.jpg


二進制
client/laya/release/web/res/qd_bg.jpg


+ 1 - 1
client/laya/src/core/mgrs/HttpMgr.ts

@@ -50,7 +50,7 @@ export class HttpMgr {
     }
 
 
-    private isDev: boolean = true;//是否是开发环境
+    private isDev: boolean = false;//是否是开发环境
     public getReqData() {
         let reqData = JSON.stringify({
             gameName: "TQ",

+ 28 - 6
client/laya/src/data/DataMgr.ts

@@ -326,6 +326,15 @@ export default class DataMgr {
         xGame.eventMgr.event(COIN_CHANGE);
         this.updateUserInfo2Server("jb");
     }
+    //設置金幣為指定的值
+    public static setCoin2(val) {
+        if (typeof val != "number") {
+            return;
+        }
+        this.userData.coin = val;
+        this.saveUserData();
+        xGame.eventMgr.event(COIN_CHANGE);
+    }
 
     /**
      * set jb  从服务器获取的金币信息
@@ -364,6 +373,20 @@ export default class DataMgr {
         this.updateUserInfo2Server("zs");
     }
 
+    /**
+     * 設置鑽石,但是不會发送给服务器,同時是更新為指定的值
+     * @param val 
+     * @returns 
+     */
+    public static setDiamond2(val) {
+        if (typeof val != "number") {
+            return;
+        }
+        this.userData.diamond = val;
+        this.saveUserData();
+        xGame.eventMgr.event(DIAMOND_CHANGE);
+    }
+
     /**
      * 更新钻石数量
      * @param val 
@@ -528,6 +551,7 @@ export default class DataMgr {
      * @param haveQiuGanJsonObj 
      */
     public static setBallRodFormServer(haveQiuGanJsonStr) {
+        console.log('zh:haveQiuGanJsonStr = ' + haveQiuGanJsonStr)
         if (!haveQiuGanJsonStr) {
             // 处理 null、undefined、空字符串、0 等情况
             console.log("setBallRodFormServer数据为空或未定义");
@@ -546,14 +570,12 @@ export default class DataMgr {
             //key 就是球杆的id 就是:123456  v=是否拥有(购买)
             let k = parseInt(key);
             let idx = k - 1;
-            console.log('zh:更新IDX = ' + idx)
+            console.log('zh:开始更新IDX = ' + idx)
             console.log('this.userData.ballRod[idx]===' + this.userData.ballRod[idx])
-            if (this.userData.ballRod[idx] === 0) {
-                console.log('zh: uuuuu  ' + (k - 1))
-                this.userData.ballRod[k - 1] = 1;//标识拥有
-                this.saveUserData();
-            }
+
+            this.userData.ballRod[idx] = v;
         });
+        // this.saveUserData();
     }
 
     //

+ 30 - 1
client/laya/src/ui/UIMain.ts

@@ -217,8 +217,22 @@ export default class UIMain extends UIBase {
         //必须要调用APP退出登录
         JSBridgeUtils.instance.loginOutForApp();
         this.setUserDefaultNickname();
+        DataMgr.setCoin2(4000);
+        DataMgr.setDiamond2(0);
+        this.setDefaultQiuGanInfo();
     }
 
+    /**
+     * 球杆信息恢复原样
+     */
+    setDefaultQiuGanInfo() {
+        DataMgr.setBallRod(0, 1);
+        DataMgr.setBallRod(1, 0);
+        DataMgr.setBallRod(2, 0);
+        DataMgr.setBallRod(3, 0);
+        DataMgr.setBallRod(4, 0);
+        DataMgr.setBallRod(5, 1);
+    }
 
     /**
      * 设置用户默认昵称
@@ -228,6 +242,8 @@ export default class UIMain extends UIBase {
         this.ui.headNode.nameTxt.text = defUsername;
         DataMgr.updateUserNickName(defUsername);
         Moyu.updateUserInfo(defUsername);
+
+
     }
 
     gotoLogin() {
@@ -762,9 +778,22 @@ export default class UIMain extends UIBase {
         //     //console.log("未授权");
         // }
         this.freshUser();
+
+
+        console.log('zh:5秒后更新用戶資產信息')
+        // Laya.timer.once(5000, this, () => {
+        //     console.log('zh:5秒over 更新用戶資產信息')
+        //     DataMgr.getUserZiChanInfo();
+        // });
+        setTimeout(() => {
+            console.log('setTimeout 5秒over 執行');
+            DataMgr.getUserZiChanInfo();
+        }, 5000);
+
+
     }
 
-    event_login_in(){
+    event_login_in() {
         console.log("zh:event_login_in被触发");
         this.freshUser();
 

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

@@ -98,7 +98,7 @@ export default class UIShop extends UIBase {
         super.show();
         //type,0-球杆,1-道具
         this.curType = type == 0 ? "qiugan" : "daoju";
-        this.switchBtn("qiugan");
+        this.switchBtn("");
         this.playSecretaryIdle();
         this.updateBallRod();
     }

部分文件因文件數量過多而無法顯示