This commit is contained in:
YZ\249929363 2025-08-01 15:43:48 +08:00
commit a7cc1e5475
2 changed files with 31 additions and 27 deletions

View File

@ -16731,10 +16731,12 @@
"setUi": {
"__id__": 96
},
"monthCardBtn": null,
"monthCardBtn2": null,
"monthCardTime": null,
"monthCard": null,
"getcard": {
"__id__": 322
},
"cardTime": {
"__id__": 341
},
"_id": "0dna+7W/NMp6RyIrSQLx5u"
},
{

View File

@ -63,15 +63,20 @@ export default class JiaZai extends cc.Component {
@property(cc.Node)
setUi: cc.Node = null;
scheduleCallback2: any;
//月卡
// //月卡
// @property(cc.Node)
// monthCardBtn: cc.Node = null;
// @property(cc.Node)
// monthCardBtn2: cc.Node = null;
// @property(cc.Node)
// monthCardTime: cc.Node = null;
// @property(cc.Node)
// monthCard: cc.Node = null;
//月卡领取
@property(cc.Node)
monthCardBtn: cc.Node = null;
getcard: cc.Node = null;
@property(cc.Node)
monthCardBtn2: cc.Node = null;
@property(cc.Node)
monthCardTime: cc.Node = null;
@property(cc.Node)
monthCard: cc.Node = null;
cardTime: cc.Node = null;
// LIFE-CYCLE CALLBACKS:
onLoad() {
@ -849,22 +854,8 @@ export default class JiaZai extends cc.Component {
console.log("未到期已领取");
}
if (data.code == 1) {
cc.fx.GameTool.changeCoin(500);
this.updateCoin();
let rewardData = [
{ type: "coin", count: 500 },
]
setTimeout(() => {
this.openRewardWindow(rewardData);
}, 500);
const dataTemp = {
change_reason: "month",
id: "1001",
num: 500,
compensate: false
}
cc.fx.GameTool.shushu_Track("resource_get", dataTemp);
this.getcard.active = true;
NumberToImage.numberToImageNodes(cc.fx.GameConfig.GM_INFO.monthTime, 40, 20, "month_", this.cardTime, true)
}
})
}
@ -970,6 +961,17 @@ export default class JiaZai extends cc.Component {
MiniGameSdk.API.shushu_SetSuperProperties(time, false);
}
}
onCardReward() {
cc.fx.GameTool.changeCoin(500);
this.updateCoin();
const dataTemp = {
change_reason: "month",
id: "1001",
num: 500,
compensate: false
}
cc.fx.GameTool.shushu_Track("resource_get", dataTemp);
}
// update (dt) {}
}