|
|
@@ -2,7 +2,7 @@
|
|
|
* @Author: mojunshou 1637302775@qq.com
|
|
|
* @Date: 2025-03-20 15:01:09
|
|
|
* @LastEditors: mojunshou 1637302775@qq.com
|
|
|
- * @LastEditTime: 2025-04-29 16:04:08
|
|
|
+ * @LastEditTime: 2025-04-30 10:32:04
|
|
|
* @Description: 消除游戏主场景
|
|
|
*/
|
|
|
import { _decorator, Button, Color, EventTouch, instantiate, JsonAsset, Animation, v3, Label, Node, Prefab, randomRangeInt, Sprite, tween, UITransform, Vec2, Vec3, Widget } from "cc";
|
|
|
@@ -292,7 +292,6 @@ export class EliminateViewComp extends CCComp {
|
|
|
}
|
|
|
|
|
|
updateGameState(event: string, args: string) {
|
|
|
- console.log("更新游戏状态", args);
|
|
|
switch (args) {
|
|
|
case "paused":
|
|
|
this.gameState = GameState.PAUSED;
|
|
|
@@ -399,7 +398,7 @@ export class EliminateViewComp extends CCComp {
|
|
|
|
|
|
|
|
|
openView(event: string, args: string) {
|
|
|
- console.log("打开的弹窗>>>>>>>>>>>>>", args);
|
|
|
+ oops.log.logView(args, "<<<<<<<打开的弹窗类型");
|
|
|
switch (args) {
|
|
|
case "openRedBagView":
|
|
|
oops.gui.open(UIID.RedPacketWithdraw);
|
|
|
@@ -1294,15 +1293,11 @@ export class EliminateViewComp extends CCComp {
|
|
|
}
|
|
|
this.operateFlag = true;
|
|
|
//新手引导
|
|
|
- console.log("消除返回", this.isGuideMode);
|
|
|
- console.log("新手引导", this.guideStep);
|
|
|
if (this.isGuideMode) {
|
|
|
this.scheduleOnce(() => {
|
|
|
if (this.guideStep < 4) {
|
|
|
- console.log("新手引导", this.guideStep);
|
|
|
this.setupGuideStep(this.guideStep + 1)
|
|
|
} else {
|
|
|
- console.log("新手引导结束");
|
|
|
this.isGuideMode = false;
|
|
|
this.guideNode.active = false;
|
|
|
Tween.stopAllByTarget(this.guideFinger);
|
|
|
@@ -1518,7 +1513,7 @@ export class EliminateViewComp extends CCComp {
|
|
|
const eliminateColumnNum = d.eliminateColumnNum
|
|
|
const totalEliminationsInThisRound = eliminateRowNum + eliminateColumnNum
|
|
|
this.eliminateTotal += totalEliminationsInThisRound;
|
|
|
- console.log("消除总数", this.eliminateTotal)
|
|
|
+ // console.log("消除总数", this.eliminateTotal)
|
|
|
if (gridEliminateList.length < 1) {
|
|
|
// 没有发生消除
|
|
|
this.updateGameScore();
|
|
|
@@ -1590,18 +1585,18 @@ 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);
|
|
|
+ //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);
|
|
|
if (this.eliminateTotal % randomNum === 0) {
|
|
|
//如果有自动就暂停自动
|
|
|
if (smc.game.GameModel.skipAdConfig != -1) {
|
|
|
@@ -1707,7 +1702,7 @@ export class EliminateViewComp extends CCComp {
|
|
|
const changeNum = smc.game.GameModel.changeWxCoin;
|
|
|
this.money = smc.account.AccountModel.wxCoin;
|
|
|
const formattedValue = changeNum;
|
|
|
- console.log("微信币增加数值>>>>>>>>>", changeNum);
|
|
|
+ //console.log("微信币增加数值>>>>>>>>>", changeNum);
|
|
|
|
|
|
// 获取并设置分数标签
|
|
|
const scoreLabel = this.tweenWechatNode.getChildByName("lab_num")?.getComponent(Label);
|
|
|
@@ -1755,7 +1750,7 @@ export class EliminateViewComp extends CCComp {
|
|
|
if (!this.tweenRedNode) return;
|
|
|
//如果有值就是要那个,没有就是取随机
|
|
|
const changeNum = smc.game.GameModel.changeHbCoin;
|
|
|
- console.log("红包分数增加动画", changeNum)
|
|
|
+ // console.log("红包分数增加动画", changeNum)
|
|
|
this.cash = smc.account.AccountModel.hbCoin;
|
|
|
if (!changeNum) return;
|
|
|
const formattedValue = changeNum;
|
|
|
@@ -2051,7 +2046,7 @@ export class EliminateViewComp extends CCComp {
|
|
|
oops.gui.open(UIID.DoubleSpeed);
|
|
|
}
|
|
|
|
|
|
- console.log("二倍速看视频统计>>>>>>>>>>>>>>>", smc.game.GameModel.doubleSpeedAdCount);
|
|
|
+ // console.log("二倍速看视频统计>>>>>>>>>>>>>>>", smc.game.GameModel.doubleSpeedAdCount);
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -2087,8 +2082,8 @@ export class EliminateViewComp extends CCComp {
|
|
|
|
|
|
// 执行自动放置
|
|
|
executeAutoPlace() {
|
|
|
- console.log("自动放置状态", this.autoState);
|
|
|
- console.log("当前游戏状态", this.gameState);
|
|
|
+ //console.log("自动放置状态", this.autoState);
|
|
|
+ // console.log("当前游戏状态", this.gameState);
|
|
|
if (!this.autoState || this.gameState !== GameState.PLAYING) {
|
|
|
return
|
|
|
}
|
|
|
@@ -2102,6 +2097,7 @@ export class EliminateViewComp extends CCComp {
|
|
|
// 执行放置
|
|
|
this.operateFlag = false;
|
|
|
this.placeBrickAtPosition(bestPlacement)
|
|
|
+ oops.log.logView
|
|
|
}
|
|
|
|
|
|
//寻找最佳位置
|