|
|
@@ -2,7 +2,7 @@
|
|
|
* @Author: mojunshou 1637302775@qq.com
|
|
|
* @Date: 2025-03-20 15:01:09
|
|
|
* @LastEditors: mojunshou 1637302775@qq.com
|
|
|
- * @LastEditTime: 2025-04-30 15:42:36
|
|
|
+ * @LastEditTime: 2025-04-30 18:04:37
|
|
|
* @Description: 消除游戏主场景
|
|
|
*/
|
|
|
import { _decorator, Button, Color, EventTouch, instantiate, JsonAsset, Animation, v3, Label, Node, Prefab, randomRangeInt, Sprite, tween, UITransform, Vec2, Vec3, Widget } from "cc";
|
|
|
@@ -1513,7 +1513,6 @@ export class EliminateViewComp extends CCComp {
|
|
|
const eliminateColumnNum = d.eliminateColumnNum
|
|
|
const totalEliminationsInThisRound = eliminateRowNum + eliminateColumnNum
|
|
|
this.eliminateTotal += totalEliminationsInThisRound;
|
|
|
- // console.log("消除总数", this.eliminateTotal)
|
|
|
if (gridEliminateList.length < 1) {
|
|
|
// 没有发生消除
|
|
|
this.updateGameScore();
|
|
|
@@ -1585,18 +1584,13 @@ export class EliminateViewComp extends CCComp {
|
|
|
if (minNum && maxNum) {
|
|
|
const randomNum = randomRangeInt(minNum, maxNum + 1);
|
|
|
//这个数可以被总消除次数整除那就可以弹广告
|
|
|
- //console.log("最小随机数>>>>>>>>>", minNum);
|
|
|
- //console.log("最大随机数>>>>>>>>>", maxNum);
|
|
|
- //console.log("消除总数>>>>>>>>>>>>>", this.eliminateTotal);
|
|
|
- //console.log("randomNum随机数>>>>>>>>>>", randomNum);
|
|
|
- ////打印少量领取总数
|
|
|
- //console.log("少量领取总数>>>>>>>>>>>>>>>", smc.game.GameModel.smallAdCount);
|
|
|
- //console.log("skipAdCount>>>>>>>>>>>>>>", smc.game.GameModel.skipAdCount)
|
|
|
- //console.log("skipAdConfig>>>>>>>>>>>>>>", smc.game.GameModel.skipAdConfig);
|
|
|
- ////打印全都要总数
|
|
|
- //console.log("全都要总数>>>>>>>>>>>>>>>", smc.game.GameModel.allAdCount);
|
|
|
- ////打印直接弹出总数
|
|
|
- //console.log("直接弹出总数>>>>>>>>>>>>>>>", smc.game.GameModel.directAdCount);
|
|
|
+ oops.log.logView(randomNum, "<<<<<<<<<随机数");
|
|
|
+ oops.log.logView(this.eliminateTotal, "<<<<<<<<<消除总数");
|
|
|
+ oops.log.logView(smc.game.GameModel.skipAdConfig, "<<<<<<<<<skipAdConfig");
|
|
|
+ oops.log.logView(smc.game.GameModel.skipAdCount, "<<<<<<<<<skipAdCount");
|
|
|
+ oops.log.logView(smc.game.GameModel.smallAdCount, "<<<<<<<<<smallAdCount");
|
|
|
+ oops.log.logView(smc.game.GameModel.allAdCount, "<<<<<<<<<allAdCount");
|
|
|
+ oops.log.logView(smc.game.GameModel.directAdCount, "<<<<<<<<<directAdCount");
|
|
|
if (this.eliminateTotal % randomNum === 0) {
|
|
|
//如果有自动就暂停自动
|
|
|
if (smc.game.GameModel.skipAdConfig != -1) {
|
|
|
@@ -1709,8 +1703,7 @@ export class EliminateViewComp extends CCComp {
|
|
|
const changeNum = smc.game.GameModel.changeWxCoin;
|
|
|
this.money = smc.account.AccountModel.wxCoin;
|
|
|
const formattedValue = changeNum;
|
|
|
- //console.log("微信币增加数值>>>>>>>>>", changeNum);
|
|
|
-
|
|
|
+ oops.log.logView(changeNum, "<<<<<<<<<微信币增加");
|
|
|
// 获取并设置分数标签
|
|
|
const scoreLabel = this.tweenWechatNode.getChildByName("lab_num")?.getComponent(Label);
|
|
|
if (scoreLabel) {
|
|
|
@@ -1757,7 +1750,7 @@ export class EliminateViewComp extends CCComp {
|
|
|
if (!this.tweenRedNode) return;
|
|
|
//如果有值就是要那个,没有就是取随机
|
|
|
const changeNum = smc.game.GameModel.changeHbCoin;
|
|
|
- // console.log("红包分数增加动画", changeNum)
|
|
|
+ oops.log.logView(changeNum, "<<<<<<<<<红包分数增加");
|
|
|
this.cash = smc.account.AccountModel.hbCoin;
|
|
|
if (!changeNum) return;
|
|
|
const formattedValue = changeNum;
|
|
|
@@ -2067,6 +2060,7 @@ export class EliminateViewComp extends CCComp {
|
|
|
this.autoState = !this.autoState;
|
|
|
this.initButtonState(this.autoState);
|
|
|
if (this.autoState) {
|
|
|
+ this.gameState = GameState.PLAYING;
|
|
|
DCHandler.inst.reportData(3000008);
|
|
|
this.executeAutoPlace();
|
|
|
this.autoFunction = this.executeAutoPlace;
|
|
|
@@ -2089,8 +2083,6 @@ export class EliminateViewComp extends CCComp {
|
|
|
|
|
|
// 执行自动放置
|
|
|
executeAutoPlace() {
|
|
|
- //console.log("自动放置状态", this.autoState);
|
|
|
- // console.log("当前游戏状态", this.gameState);
|
|
|
if (!this.autoState || this.gameState !== GameState.PLAYING) {
|
|
|
return
|
|
|
}
|
|
|
@@ -2104,7 +2096,6 @@ export class EliminateViewComp extends CCComp {
|
|
|
// 执行放置
|
|
|
this.operateFlag = false;
|
|
|
this.placeBrickAtPosition(bestPlacement)
|
|
|
- oops.log.logView
|
|
|
}
|
|
|
|
|
|
//寻找最佳位置
|
|
|
@@ -2318,6 +2309,7 @@ export class EliminateViewComp extends CCComp {
|
|
|
this.initButtonState(this.autoState);
|
|
|
oops.gui.open(UIID.KeepSpeed);
|
|
|
this.unschedule(this.callback);
|
|
|
+ DCHandler.inst.reportData(3000305);
|
|
|
}
|
|
|
}
|
|
|
if (!this.autoState && this.doubleSpeedTime) {
|