|
|
@@ -2,7 +2,7 @@
|
|
|
* @Author: mojunshou 1637302775@qq.com
|
|
|
* @Date: 2025-03-20 15:01:09
|
|
|
* @LastEditors: mojunshou 1637302775@qq.com
|
|
|
- * @LastEditTime: 2025-04-27 15:21:12
|
|
|
+ * @LastEditTime: 2025-04-27 16:20:21
|
|
|
* @Description: 消除游戏主场景
|
|
|
*/
|
|
|
import { _decorator, Button, Color, EventTouch, instantiate, JsonAsset, v3, Label, Node, Prefab, randomRangeInt, Sprite, tween, UITransform, Vec2, Vec3, Widget } from "cc";
|
|
|
@@ -234,6 +234,8 @@ export class EliminateViewComp extends CCComp {
|
|
|
//新手引导
|
|
|
private isGuideMode = false;
|
|
|
private guideStep = 0;
|
|
|
+ //自动间隔时间
|
|
|
+ private autoInterval: number = 1.5;
|
|
|
|
|
|
//福利弹窗
|
|
|
private popupType: string = "";
|
|
|
@@ -1573,9 +1575,6 @@ export class EliminateViewComp extends CCComp {
|
|
|
//这个数可以被总消除次数整除那就可以弹广告
|
|
|
if (this.eliminateTotal % randomNum === 0) {
|
|
|
//如果有自动就暂停自动
|
|
|
- if (this.autoState) {
|
|
|
- this.gameState = GameState.PAUSED;
|
|
|
- }
|
|
|
if (smc.game.GameModel.skipAdConfig != -1) {
|
|
|
if (smc.game.GameModel.skipAdCount > 0 && smc.game.GameModel.skipAdCount % smc.game.GameModel.skipAdConfig == 0) {
|
|
|
console.log("skipAdCount>>>>>>>>>>>>>>>", smc.game.GameModel.skipAdCount);
|
|
|
@@ -1583,9 +1582,15 @@ export class EliminateViewComp extends CCComp {
|
|
|
smc.game.GameModel.viewType = "double_reward";
|
|
|
ADHandler.inst.showAd(AD_TYPE.Double_Receive);
|
|
|
} else {
|
|
|
+ if (this.autoState) {
|
|
|
+ this.gameState = GameState.PAUSED;
|
|
|
+ }
|
|
|
ServerHandler.inst.getDoubleSurprise();
|
|
|
}
|
|
|
} else {
|
|
|
+ if (this.autoState) {
|
|
|
+ this.gameState = GameState.PAUSED;
|
|
|
+ }
|
|
|
ServerHandler.inst.getDoubleSurprise();
|
|
|
}
|
|
|
}
|
|
|
@@ -1593,6 +1598,7 @@ export class EliminateViewComp extends CCComp {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
this.updateGameScore();
|
|
|
resolve(true)
|
|
|
}, 0.1)
|
|
|
@@ -2050,7 +2056,7 @@ export class EliminateViewComp extends CCComp {
|
|
|
DCHandler.inst.reportData(3000008);
|
|
|
this.executeAutoPlace();
|
|
|
this.autoFunction = this.executeAutoPlace;
|
|
|
- this.schedule(this.autoFunction, 1.5);
|
|
|
+ this.schedule(this.autoFunction, this.autoInterval);
|
|
|
this.autoNode.active = true;
|
|
|
} else {
|
|
|
//关闭
|
|
|
@@ -2279,6 +2285,7 @@ export class EliminateViewComp extends CCComp {
|
|
|
if (this.gameState === GameState.PLAYING && this.autoState) {
|
|
|
this.doubleSpeedTime--
|
|
|
this.autoMoveTime = 0.25;
|
|
|
+ this.autoInterval = 1.1;
|
|
|
//修改剩余时间,秒格式化成时分10:59
|
|
|
const minutes = Math.floor(this.doubleSpeedTime / 60);
|
|
|
const seconds = this.doubleSpeedTime % 60;
|
|
|
@@ -2287,6 +2294,7 @@ export class EliminateViewComp extends CCComp {
|
|
|
//时间到了
|
|
|
if (this.doubleSpeedTime <= 0) {
|
|
|
this.autoMoveTime = 0.4;
|
|
|
+ this.autoInterval = 1.5;
|
|
|
this.lab_doubleTime.string = "二倍速";
|
|
|
this.isDoubleSpeed = false;
|
|
|
this.doubleNum = 1;
|
|
|
@@ -2473,15 +2481,4 @@ export class EliminateViewComp extends CCComp {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- //用导演直接冻结游戏或者恢复游戏
|
|
|
- updateGameStatus() {
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
}
|