浏览代码

【优化】修改翻倍弹窗进度条显示叠加问题

mojunshou 7 月之前
父节点
当前提交
a372eb5653

+ 1 - 1
assets/bundle/gui/eliminate/prefab/doubleRewards.prefab

@@ -3100,7 +3100,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": -1.148,
-      "y": 80.155,
+      "y": 86.711,
       "z": 0
     },
     "_lrot": {

+ 2 - 2
assets/bundle/gui/eliminate/prefab/doubleSpeed.prefab

@@ -1701,8 +1701,8 @@
     },
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 0.2950000000000159,
-      "y": 197.89600000000007,
+      "x": 0.295,
+      "y": 208.413,
       "z": 0
     },
     "_lrot": {

+ 2 - 2
assets/bundle/gui/eliminate/prefab/item/bricsItem.prefab

@@ -861,7 +861,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 122,
+      "width": 123,
       "height": 50
     },
     "_anchorPoint": {
@@ -903,7 +903,7 @@
     },
     "_type": 0,
     "_fillType": 0,
-    "_sizeMode": 1,
+    "_sizeMode": 2,
     "_fillCenter": {
       "__type__": "cc.Vec2",
       "x": 0,

+ 2 - 1
assets/script/game/common/manager/ProtocolEvent.ts

@@ -2,13 +2,14 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-04-07 10:17:16
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-29 16:31:08
+ * @LastEditTime: 2025-04-29 17:06:07
  * @Description: 消息定义
  */
 
 // const server_url = "http://192.168.10.103:8880";
 // https://central-test.atmob.com
 const server_url = "https://central-test.atmob.com";
+
 export enum ProtocolEvent {
     /**微信登录*/
     WechatLogin = server_url + "/project/playlet/v1/user/login",

+ 1 - 2
assets/script/game/common/setting/SettingViewComp.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-20 15:40:20
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-27 17:56:10
+ * @LastEditTime: 2025-04-29 16:48:45
  * @Description:设置界面 
  */
 import { _decorator } from "cc";
@@ -152,7 +152,6 @@ export class SettingViewComp extends CCVMParentComp {
         } else {
             DCHandler.inst.reportData(3001003);
         }
-        console.log(">>>>>>>>>>>>oops.audio.musicVolume", oops.audio.volumeMusic)
         const btn_on = this.musicBtn.node.getChildByPath("btn_on")!;
         const btn_off = this.musicBtn.node.getChildByPath("btn_off")!;
         btn_on.active = this._musicState;

+ 2 - 1
assets/script/game/view/BricsItem.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-04-18 15:09:04
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-19 15:20:09
+ * @LastEditTime: 2025-04-29 17:30:33
  * @Description: 金砖道具
  */
 import { _decorator, Component, Label, Node, Sprite, SpriteFrame } from 'cc';
@@ -74,6 +74,7 @@ export class BricsItem extends VMParent {
             } else if (this.data.isAllWithdrawBeforeSecondLast) {
                 //展示特殊状态
                 this.icon2Node.active = true;
+                this.iconNode.active = false;
             }
         }
         //显示光圈

+ 7 - 6
assets/script/game/view/DoubleRewardsView.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-21 11:57:43
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-28 16:38:08
+ * @LastEditTime: 2025-04-29 17:09:44
  * @Description: 惊喜翻倍弹窗
  */
 import { _decorator, instantiate, Label, Node, Prefab, UITransform } from 'cc';
@@ -98,7 +98,6 @@ export class DoubleRewardsView extends VMParent {
         oops.gui.remove(UIID.DoubleRewards);
         oops.message.dispatchEvent(GameEvent.updateGameState, "playing");
         smc.game.GameModel.allAdCount++;
-        smc.game.GameModel.smallAdCount = 0;
     }
 
 
@@ -161,7 +160,7 @@ export class DoubleRewardsView extends VMParent {
                     if (this.data.curGoldNum / this.data.handlingCharge > 0.5) {
                         this.tipsLabelNode.setPosition(60, this.tipsLabelNode.position.y);
                     } else if (this.data.curGoldNum / this.data.handlingCharge < 0.5) {
-                        this.tipsLabelNode.setPosition(-60, this.tipsLabelNode.position.y);
+                        this.tipsLabelNode.setPosition(-80, this.tipsLabelNode.position.y);
                     } else {
                         this.tipsLabelNode.setPosition(0, this.tipsLabelNode.position.y);
                     }
@@ -254,9 +253,9 @@ export class DoubleRewardsView extends VMParent {
         const firstLevel = levelInfoList[0].level;
         const lastLevel = levelInfoList[levelInfoList.length - 1].level;
         const levelRange = lastLevel - firstLevel || 1;
-
         let foundFirstNotWithdraw = false;
-
+        //现在要算平均长度,总长度除数组长度
+        let singleLength = totalLength / levelInfoList.length;
         const secondLastIndex = levelInfoList.length - 2;
         const allBeforeSecondLastWithdrawed = levelInfoList
             .slice(0, secondLastIndex)
@@ -269,7 +268,9 @@ export class DoubleRewardsView extends VMParent {
             } else if (index === levelInfoList.length - 1) {
                 item.position = this.progressNode.position.x + totalLength;
             } else {
-                item.position = this.progressNode.position.x + (((item.level - firstLevel) / levelRange) * totalLength);
+                //因为产品和UI说只要算平均长度就好
+                // item.position = this.progressNode.position.x + (((item.level - firstLevel) / levelRange) * totalLength);
+                item.position = this.progressNode.position.x + index * singleLength;
             }
 
             // 标记第一个未提现

+ 1 - 2
assets/script/game/view/WechatWithdrawalViewComp.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-20 17:00:12
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-28 15:23:16
+ * @LastEditTime: 2025-04-29 16:48:54
  * @Description: 微信提现页面
  */
 import { _decorator, ImageAsset, Label, Node, RichText, Size, Sprite, SpriteFrame, Texture2D, tween, UITransform, Vec3 } from "cc";
@@ -176,7 +176,6 @@ export class WechatWithdrawalViewComp extends CCVMParentComp {
             uiTransform?.setContentSize(new Size(34, 34))
             let sprite = spriteNode.getComponent(Sprite);
             if (sprite) {
-                console.log("更新头像啦")
                 var opt: IRemoteOptions = { ext: ".png" };
                 var onComplete = (err: Error | null, data: ImageAsset) => {
                     const texture = new Texture2D();