|
|
@@ -51,6 +51,9 @@ export default class RedBagTask extends cc.Component {
|
|
|
|
|
|
private isRefreshTask = false;
|
|
|
|
|
|
+ private btnCD = 0;
|
|
|
+ private startTimes = false;
|
|
|
+
|
|
|
|
|
|
start() {
|
|
|
mk.console.logSingle('redBagTask=>', gData.gameData.playerProp.userFarmTaskInfo);
|
|
|
@@ -156,6 +159,16 @@ export default class RedBagTask extends cc.Component {
|
|
|
this.showNewTaskUI();
|
|
|
this.isShowNewTask = true;
|
|
|
}
|
|
|
+
|
|
|
+ if(this.startTimes)
|
|
|
+ {
|
|
|
+ this.btnCD += dt;
|
|
|
+ if(this.btnCD >= 2)
|
|
|
+ {
|
|
|
+ this.startTimes = false;
|
|
|
+ this.btnCD = 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
private initTaskProgressUI() {
|
|
|
@@ -239,6 +252,14 @@ export default class RedBagTask extends cc.Component {
|
|
|
private clickGetRewardBtn() {
|
|
|
//gData.receiptNotice.receip_rmb = gData.blessingBag.rbNum;
|
|
|
//mk.ui.openPanel('module/newNotice/newNotice');
|
|
|
+
|
|
|
+ if(!this.startTimes)
|
|
|
+ {
|
|
|
+ this.startTimes = true;
|
|
|
+ this.btnCD = 0;
|
|
|
+ }else{
|
|
|
+ return;
|
|
|
+ }
|
|
|
mk.audio.playEffect("button");
|
|
|
if (this.isCanCash) {
|
|
|
if (cc.sys.isNative) {
|