|
|
@@ -2,7 +2,7 @@
|
|
|
* @Author: mojunshou 1637302775@qq.com
|
|
|
* @Date: 2025-03-20 15:01:09
|
|
|
* @LastEditors: mojunshou 1637302775@qq.com
|
|
|
- * @LastEditTime: 2025-04-28 14:59:42
|
|
|
+ * @LastEditTime: 2025-04-28 16:38:40
|
|
|
* @Description: 消除游戏主场景
|
|
|
*/
|
|
|
import { _decorator, Button, Color, EventTouch, instantiate, JsonAsset, v3, Label, Node, Prefab, randomRangeInt, Sprite, tween, UITransform, Vec2, Vec3, Widget } from "cc";
|
|
|
@@ -351,6 +351,11 @@ export class EliminateViewComp extends CCComp {
|
|
|
this.shouldResetEliminateCount = true;
|
|
|
this.currentCombo = 0;
|
|
|
this.autoNode.active = false;
|
|
|
+
|
|
|
+ smc.game.GameModel.smallAdCount = 0;
|
|
|
+ smc.game.GameModel.allAdCount = 0;
|
|
|
+ smc.game.GameModel.directAdCount = 0;
|
|
|
+ smc.game.GameModel.doubleSpeedAdCount = 0;
|
|
|
}
|
|
|
|
|
|
//设置数据
|
|
|
@@ -1580,24 +1585,25 @@ export class EliminateViewComp extends CCComp {
|
|
|
console.log("最大随机数>>>>>>>>>", maxNum);
|
|
|
console.log("消除总数>>>>>>>>>>>>>", this.eliminateTotal);
|
|
|
console.log("randomNum随机数>>>>>>>>>>", randomNum);
|
|
|
+ console.log("skipAdCount>>>>>>>>>>>>>>>", smc.game.GameModel.skipAdCount);
|
|
|
+ console.log("skipAdConfig>>>>>>>>>>>>>>", smc.game.GameModel.skipAdConfig);
|
|
|
+ //打印少量领取总数
|
|
|
+ console.log("少量领取总数>>>>>>>>>>>>>>>", smc.game.GameModel.smallAdCount);
|
|
|
+ //打印全都要总数
|
|
|
+ console.log("全都要总数>>>>>>>>>>>>>>>", smc.game.GameModel.allAdCount);
|
|
|
+ //打印直接弹出总数
|
|
|
+ console.log("直接弹出总数>>>>>>>>>>>>>>>", smc.game.GameModel.directAdCount);
|
|
|
if (this.eliminateTotal % randomNum === 0) {
|
|
|
//如果有自动就暂停自动
|
|
|
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);
|
|
|
- console.log("skipAdConfig>>>>>>>>>>>>>>", smc.game.GameModel.skipAdConfig);
|
|
|
smc.game.GameModel.viewType = "double_reward";
|
|
|
+ smc.game.GameModel.directAdCount++; //测试看
|
|
|
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();
|
|
|
}
|
|
|
}
|
|
|
@@ -1605,8 +1611,6 @@ export class EliminateViewComp extends CCComp {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- // this.updateGameScore();
|
|
|
resolve(true)
|
|
|
}, 0.1)
|
|
|
})
|
|
|
@@ -2037,6 +2041,8 @@ export class EliminateViewComp extends CCComp {
|
|
|
} else {
|
|
|
oops.gui.open(UIID.DoubleSpeed);
|
|
|
}
|
|
|
+
|
|
|
+ console.log("二倍速看视频统计>>>>>>>>>>>>>>>", smc.game.GameModel.doubleSpeedAdCount);
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -2359,9 +2365,9 @@ export class EliminateViewComp extends CCComp {
|
|
|
const showState = smc.game.GameModel.popupShow
|
|
|
if (!showState) {
|
|
|
//展示这些的时候,游戏要暂停
|
|
|
- if (this.popupType != "") {
|
|
|
- this.gameState = GameState.PAUSED;
|
|
|
- }
|
|
|
+ // if (this.popupType != "") {
|
|
|
+ // this.gameState = GameState.PAUSED;
|
|
|
+ // }
|
|
|
switch (this.popupType) {
|
|
|
case "weal_1":
|
|
|
oops.gui.open(UIID.WarmReminder);
|