|
|
@@ -2,7 +2,7 @@
|
|
|
* @Author: mojunshou 1637302775@qq.com
|
|
|
* @Date: 2025-03-20 15:01:09
|
|
|
* @LastEditors: mojunshou 1637302775@qq.com
|
|
|
- * @LastEditTime: 2025-04-21 16:38:46
|
|
|
+ * @LastEditTime: 2025-04-21 17:33:14
|
|
|
* @Description: 消除游戏主场景
|
|
|
*/
|
|
|
import { _decorator, Button, Color, EventTouch, instantiate, JsonAsset, Label, Node, Prefab, randomRangeInt, Sprite, tween, UITransform, Vec2, Vec3, Widget } from "cc";
|
|
|
@@ -239,6 +239,7 @@ export class EliminateViewComp extends CCComp {
|
|
|
if (this.guideStep === 0 && smc.account.AccountModel.curLevel == 1) {
|
|
|
this.startGuideMode()
|
|
|
} else {
|
|
|
+ this.guideNode.active = false;
|
|
|
this.initGrid();
|
|
|
}
|
|
|
|
|
|
@@ -311,7 +312,9 @@ export class EliminateViewComp extends CCComp {
|
|
|
this.lab_wxCoin.string = Format.formatWxCoin(this.money);
|
|
|
this.lab_hbCoin.string = Format.formatRedPacketCoin(this.cash);
|
|
|
this.lab_taget.string = this.targetScore.toString();
|
|
|
- this.lab_goldNum.string = smc.account.AccountModel.goldCoin.toString();
|
|
|
+ //金砖数量要加1
|
|
|
+ const num = smc.account.AccountModel.goldCoin
|
|
|
+ this.lab_goldNum.string = `${num + 1}`;
|
|
|
this.gameState = GameState.PLAYING;
|
|
|
}
|
|
|
|
|
|
@@ -564,9 +567,7 @@ export class EliminateViewComp extends CCComp {
|
|
|
}
|
|
|
);
|
|
|
}
|
|
|
-
|
|
|
this.updateGameScore();
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -1106,6 +1107,7 @@ export class EliminateViewComp extends CCComp {
|
|
|
|
|
|
// 显示放置得分动画(显示一次,包含总格子数)
|
|
|
this.showScoreAnimation(centerPos, placedGridCount);
|
|
|
+ //这里要计算分数,并且计算能消除的分数,然后增加分,这才对
|
|
|
|
|
|
// 标记需要重置消除计数器
|
|
|
this.shouldResetEliminateCount = true;
|
|
|
@@ -1252,7 +1254,6 @@ export class EliminateViewComp extends CCComp {
|
|
|
|
|
|
// 更新总分
|
|
|
this.score += calculatedScore;
|
|
|
- this.updateGameScore();
|
|
|
}
|
|
|
|
|
|
// 显示消除次数动画
|
|
|
@@ -1324,6 +1325,7 @@ export class EliminateViewComp extends CCComp {
|
|
|
console.log("消除总数", this.eliminateTotal)
|
|
|
if (gridEliminateList.length < 1) {
|
|
|
// 没有发生消除
|
|
|
+ this.updateGameScore();
|
|
|
this.shouldResetEliminateCount = true; // 下一次消除需要重置计数
|
|
|
resolve(false);
|
|
|
return;
|