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

【bug】修改一些问题

mojunshou пре 7 месеци
родитељ
комит
e5b67daac6

+ 5 - 5
assets/script/game/common/manager/ADHandler.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-04-11 10:14:44
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-25 18:09:50
+ * @LastEditTime: 2025-04-25 18:38:23
  * @Description: 
  */
 // ADHandler.ts
@@ -124,14 +124,15 @@ export class ADHandler {
         oops.gui.waitClose();
         smc.game.GameModel.isShowAd = false;
         console.log("[广告] 激励视频关闭", state)
+        oops.message.dispatchEvent(GameEvent.updateGameState, "playing");
         if (state) {
             //看完了可以领取奖励
-            ServerHandler.inst.getVideorReward();
             if (smc.game.GameModel.viewType === "speed_reward") {
-                //直接成功-增加时长
-                oops.message.dispatchEvent(GameEvent.updateGameState, "playing");
+                console.log("自动放置奖励发放成功")
                 oops.message.dispatchEvent(GameEvent.DoubleSpeedOpenSuccess);
                 smc.game.GameModel.viewType = "";
+            } else {
+                ServerHandler.inst.getVideorReward();
             }
             //如果是复活,分数不减
             if (smc.game.GameModel.viewType === "revive_reward") {
@@ -148,7 +149,6 @@ export class ADHandler {
                 ServerHandler.inst.RestartGame();
             }
         }
-        oops.message.dispatchEvent(GameEvent.updateGameState, "playing"); //要判断是暂停才可以继续
     };
 }
 window["ADHandler"] = ADHandler;

+ 3 - 3
assets/script/game/common/manager/ProtocolEvent.ts

@@ -2,13 +2,13 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-04-07 10:17:16
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-25 17:29:20
+ * @LastEditTime: 2025-04-25 18:42:56
  * @Description: 消息定义
  */
 
-const server_url = "http://192.168.10.103:8880";
+// const server_url = "http://192.168.10.103:8880";
 // https://central-test.atmob.com
-// const server_url = "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 - 4
assets/script/game/common/manager/ServerHandler.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-04-11 10:16:41
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-25 18:14:33
+ * @LastEditTime: 2025-04-25 18:18:20
  * @Description: 
  */
 // ServerHandler.ts
@@ -562,9 +562,6 @@ export class ServerHandler {
         smc.game.GameModel.popupShow = result.status || true;
     }
 
-
-
-
     //领取手续费
     getFee() {
         const param = {

+ 1 - 2
assets/script/game/common/tips/KindTipsView.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-19 18:02:51
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-25 17:02:54
+ * @LastEditTime: 2025-04-25 18:53:36
  * @Description: 温馨提示弹窗
  */
 import { _decorator } from 'cc';
@@ -11,7 +11,6 @@ import { DeviceUtil } from 'db://oops-framework/core/utils/DeviceUtil';
 import { GameComponent } from 'db://oops-framework/module/common/GameComponent';
 import { AD_TYPE } from '../config/GameDefine';
 import { UIID } from '../config/GameUIConfig';
-import { CocosHandler } from '../manager/CocosHandler';
 import { ADHandler } from '../manager/ADHandler';
 import { LoginHandler } from '../manager/LoginHandler';
 import { DCHandler } from '../manager/DCHandler';

+ 1 - 1
assets/script/game/common/tips/RetentionView.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-19 18:02:51
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-25 17:22:44
+ * @LastEditTime: 2025-04-25 18:53:48
  * @Description: 隐私挽留弹窗
  */
 import { _decorator, game } from 'cc';

+ 7 - 9
assets/script/game/view/EliminateViewComp.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-20 15:01:09
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-25 18:11:18
+ * @LastEditTime: 2025-04-25 18:39:45
  * @Description: 消除游戏主场景
  */
 import { _decorator, Button, Color, EventTouch, instantiate, JsonAsset, v3, Label, Node, Prefab, randomRangeInt, Sprite, tween, UITransform, Vec2, Vec3, Widget } from "cc";
@@ -191,7 +191,7 @@ export class EliminateViewComp extends CCComp {
     //不可用的颜色
     unavailableColor = new Color(255, 0, 0, 100)
     //旋转容错
-    rotateFaultTolerant = 10;
+    rotateFaultTolerant = 50;
 
     isAutoMode: boolean = false;
     autoModeInterval: number = 1  // 自动模式的间隔时间(秒)
@@ -286,11 +286,9 @@ export class EliminateViewComp extends CCComp {
                 this.gameState = GameState.PAUSED;
                 break;
             case "playing":
-                this.scheduleOnce(() => {
-                    if (this.gameState == GameState.PAUSED || this.autoState && this.gameState == GameState.GAME_OVER) {
-                        this.gameState = GameState.PLAYING;
-                    }
-                }, 0.5)
+                if (this.gameState == GameState.PAUSED || this.autoState && this.gameState == GameState.GAME_OVER || this.autoState && this.gameState == GameState.GAME_PASS) {
+                    this.gameState = GameState.PLAYING;
+                }
                 break;
         }
     }
@@ -495,8 +493,8 @@ export class EliminateViewComp extends CCComp {
             const midX = transform.width / 2;
             node.setPosition(0, 0);
             brickData.brickNode = node
-            brickData.brickNode.scale_x = 0.6;
-            brickData.brickNode.scale_y = 0.6;
+            brickData.brickNode.scale_x = 0.8;
+            brickData.brickNode.scale_y = 0.8;
             brickData.brickInitPos = node.getWorldPosition()
             this.bricksList.push(brickData)
             this.brickAddEvent(brickData)