|
@@ -50,6 +50,9 @@ export default class Reward extends cc.Component {
|
|
|
private lbl_cash_out: cc.Label = null;
|
|
private lbl_cash_out: cc.Label = null;
|
|
|
@property({ displayName: '提现金额', type: cc.Label })
|
|
@property({ displayName: '提现金额', type: cc.Label })
|
|
|
private lbl_cash: cc.Label = null;
|
|
private lbl_cash: cc.Label = null;
|
|
|
|
|
+ @property({ displayName: '提现按钮', type: cc.Animation })
|
|
|
|
|
+ private node_cash: cc.Animation = null;
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 当前阶段 */
|
|
/** 当前阶段 */
|
|
@@ -124,6 +127,11 @@ export default class Reward extends cc.Component {
|
|
|
const fillRange = newRedMoney / cash_data.type_value >= 1 ? 1 : newRedMoney / cash_data.type_value;
|
|
const fillRange = newRedMoney / cash_data.type_value >= 1 ? 1 : newRedMoney / cash_data.type_value;
|
|
|
// this.spr_cash_out.fillRange = fillRange;
|
|
// this.spr_cash_out.fillRange = fillRange;
|
|
|
cc.tween(this.spr_cash_out).to(fillRange, { fillRange: fillRange }).start();
|
|
cc.tween(this.spr_cash_out).to(fillRange, { fillRange: fillRange }).start();
|
|
|
|
|
+ if (redMoney >= cash_data.type_value) {
|
|
|
|
|
+ this.node_cash.play();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.node_cash.stop();
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -140,13 +148,19 @@ export default class Reward extends cc.Component {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
- mk.ad.watchAd((success: boolean) => {
|
|
|
|
|
- mk.console.log("watchAD:" + success);
|
|
|
|
|
- if (success) {
|
|
|
|
|
- gData.adData.watchVideo(gData.reward.subType === 2 ? AdFun.checkpoint : AdFun.bubble);
|
|
|
|
|
- gData.reward.subType = null;
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ if (true) {
|
|
|
|
|
+ mk.ad.watchAd((success: boolean) => {
|
|
|
|
|
+ mk.console.log("watchAD:" + success);
|
|
|
|
|
+ if (success) {
|
|
|
|
|
+ gData.adData.watchVideo(gData.reward.subType === 2 ? AdFun.checkpoint : AdFun.bubble);
|
|
|
|
|
+ gData.reward.subType = null;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 用户第一次看此视频时,可不需要看直接领取奖励
|
|
|
|
|
+ gData.adData.watchVideo(gData.reward.subType === 2 ? AdFun.checkpoint : AdFun.bubble);
|
|
|
|
|
+ gData.reward.subType = null;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
// gData.reward.adData = {}
|
|
// gData.reward.adData = {}
|
|
|
// gData.reward.adData.videoRedMoney = {}
|
|
// gData.reward.adData.videoRedMoney = {}
|