|
|
@@ -2,7 +2,7 @@
|
|
|
* @Author: mojunshou 1637302775@qq.com
|
|
|
* @Date: 2025-03-20 15:01:09
|
|
|
* @LastEditors: mojunshou 1637302775@qq.com
|
|
|
- * @LastEditTime: 2025-04-23 15:13:01
|
|
|
+ * @LastEditTime: 2025-04-23 16:45:39
|
|
|
* @Description: 消除游戏主场景
|
|
|
*/
|
|
|
import { _decorator, Button, Color, EventTouch, instantiate, JsonAsset, Label, Node, Prefab, randomRangeInt, Sprite, tween, UITransform, Vec2, Vec3, Widget } from "cc";
|
|
|
@@ -16,6 +16,7 @@ import { UIID } from "../common/config/GameUIConfig";
|
|
|
import { ServerHandler } from "../common/manager/ServerHandler";
|
|
|
import { smc } from "../common/SingletonModuleComp";
|
|
|
import { Format } from "../utils/Format";
|
|
|
+import { DCHandler } from "../common/manager/DCHandler";
|
|
|
|
|
|
const { ccclass, property } = _decorator;
|
|
|
|
|
|
@@ -247,6 +248,8 @@ export class EliminateViewComp extends CCComp {
|
|
|
//更新福利点
|
|
|
this.updateWelfarePoint();
|
|
|
|
|
|
+ DCHandler.inst.reportData(3000005);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -1045,6 +1048,8 @@ export class EliminateViewComp extends CCComp {
|
|
|
brickData.rotateNode.active = false;
|
|
|
}
|
|
|
}, 0.4);
|
|
|
+ //打点
|
|
|
+ DCHandler.inst.reportData(3000600);
|
|
|
}
|
|
|
} else if (this.editingData.brickData && this.editingData.gridList.length > 0) {
|
|
|
if (this.isGuideMode && this.guideStep > 0) {
|
|
|
@@ -1534,22 +1539,17 @@ export class EliminateViewComp extends CCComp {
|
|
|
for (let i = 0; i < totalCoins; i++) {
|
|
|
const coin = instantiate(prefab);
|
|
|
this.node.addChild(coin);
|
|
|
- coin.setWorldPosition(startPos);
|
|
|
|
|
|
- // 随机偏移起始位置
|
|
|
- const randomOffset = new Vec3(
|
|
|
- (Math.random() - 0.5) * 50,
|
|
|
- (Math.random() - 0.5) * 50,
|
|
|
- 0
|
|
|
- );
|
|
|
+ //设置位置,取舞台中间位置世界坐标
|
|
|
+ coin.setWorldPosition(startPos);
|
|
|
|
|
|
// 创建曲线动画
|
|
|
const num = this.isDoubleSpeed ? this.doubleNum : 1;
|
|
|
tween(coin)
|
|
|
.to(0.2 / num, {
|
|
|
position: new Vec3(
|
|
|
- coin.position.x + randomOffset.x,
|
|
|
- coin.position.y + randomOffset.y,
|
|
|
+ coin.position.x,
|
|
|
+ coin.position.y,
|
|
|
0
|
|
|
)
|
|
|
})
|
|
|
@@ -1902,16 +1902,19 @@ export class EliminateViewComp extends CCComp {
|
|
|
private btn_setting() {
|
|
|
oops.gui.open(UIID.Setting);
|
|
|
this.gameState = GameState.PAUSED;
|
|
|
+ DCHandler.inst.reportData(3000011);
|
|
|
}
|
|
|
|
|
|
//左边微信按钮
|
|
|
private btn_withdraw() {
|
|
|
if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
|
|
|
ServerHandler.inst.getWechatTxInfo();
|
|
|
+ DCHandler.inst.reportData(3000006);
|
|
|
} else {
|
|
|
oops.gui.open(UIID.WechatWithdraw);
|
|
|
}
|
|
|
this.gameState = GameState.PAUSED;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
//顶部红包按钮
|
|
|
@@ -1920,6 +1923,7 @@ export class EliminateViewComp extends CCComp {
|
|
|
|
|
|
if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
|
|
|
ServerHandler.inst.getHbTxInfo();
|
|
|
+ DCHandler.inst.reportData(3000007);
|
|
|
} else {
|
|
|
oops.gui.open(UIID.RedPacketWithdraw);
|
|
|
}
|
|
|
@@ -1932,6 +1936,7 @@ export class EliminateViewComp extends CCComp {
|
|
|
if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
|
|
|
this.gameState = GameState.PAUSED;
|
|
|
ServerHandler.inst.getDoubleSpeedTime();
|
|
|
+ DCHandler.inst.reportData(3000010);
|
|
|
} else {
|
|
|
oops.gui.open(UIID.DoubleSpeed);
|
|
|
}
|
|
|
@@ -1946,13 +1951,14 @@ export class EliminateViewComp extends CCComp {
|
|
|
this.autoState = !this.autoState;
|
|
|
this.initButtonState(this.autoState);
|
|
|
if (this.autoState) {
|
|
|
-
|
|
|
+ DCHandler.inst.reportData(3000008);
|
|
|
this.executeAutoPlace();
|
|
|
this.autoFunction = this.executeAutoPlace;
|
|
|
this.schedule(this.autoFunction, 1.5);
|
|
|
} else {
|
|
|
//关闭
|
|
|
if (this.autoFunction) {
|
|
|
+ DCHandler.inst.reportData(3000009);
|
|
|
this.unschedule(this.autoFunction);
|
|
|
this.autoFunction = null;
|
|
|
this.initButtonState(false);
|
|
|
@@ -2158,7 +2164,7 @@ export class EliminateViewComp extends CCComp {
|
|
|
this.doubleNum = 2;
|
|
|
//改变按钮时间
|
|
|
// let time = smc.game.GameModel.doubleSpeedTime;
|
|
|
- this.doubleSpeedTime = smc.game.GameModel.doubleSpeedTime;
|
|
|
+ this.doubleSpeedTime = this.doubleSpeedTime + smc.game.GameModel.doubleSpeedTime;
|
|
|
if (this.doubleSpeedTime <= 0) {
|
|
|
return
|
|
|
}
|