|
|
@@ -55,6 +55,8 @@ export default class Game extends cc.Component {
|
|
|
sp_levelPer: cc.Sprite = null;
|
|
|
@property({ type: cc.Animation, displayName: '增加效果文本' })
|
|
|
ani_add: cc.Animation = null;
|
|
|
+ @property({ type: cc.Node, displayName: '任务红包手' })
|
|
|
+ node_hand: cc.Node = null;
|
|
|
|
|
|
|
|
|
/** 是否开始增加次数倒计时 */
|
|
|
@@ -179,7 +181,20 @@ export default class Game extends cc.Component {
|
|
|
if (gData.gameData.gameData.userFarmTaskInfo) {
|
|
|
let com = gData.gameData.gameData.userFarmTaskInfo.completeCount;
|
|
|
let count = gData.gameData.gameData.userFarmTaskInfo.taskCount;
|
|
|
- this.lbl_task.string = `<b><color=#8D4D32>进行${count}次生产</c><color=#7EB80E>(${com}/${count})</color></b>`
|
|
|
+ if(gData.gameData.init_redBagTask)
|
|
|
+ {
|
|
|
+ this.lbl_task.string = `<b><color=#8D4D32>点击领取任务!</c></b>`
|
|
|
+ this.node_hand.active = true;
|
|
|
+ }else{
|
|
|
+ this.lbl_task.string = `<b><color=#8D4D32>进行${count}次生产</c><color=#7EB80E>(${com}/${count})</color></b>`
|
|
|
+ if(com >= count)
|
|
|
+ {
|
|
|
+ this.node_hand.active = true;
|
|
|
+ }else{
|
|
|
+ this.node_hand.active = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|
|
|
@@ -201,7 +216,19 @@ export default class Game extends cc.Component {
|
|
|
if (gData.gameData.gameData.userFarmTaskInfo) {
|
|
|
let com = gData.gameData.gameData.userFarmTaskInfo.completeCount;
|
|
|
let count = gData.gameData.gameData.userFarmTaskInfo.taskCount;
|
|
|
- this.lbl_task.string = `<b><color=#8D4D32>进行${count}次生产</c><color=#7EB80E>(${com}/${count})</color></b>`
|
|
|
+ if(gData.gameData.init_redBagTask)
|
|
|
+ {
|
|
|
+ this.lbl_task.string = `<b><color=#8D4D32>点击领取任务!</c></b>`
|
|
|
+ this.node_hand.active = true;
|
|
|
+ }else{
|
|
|
+ this.lbl_task.string = `<b><color=#8D4D32>进行${count}次生产</c><color=#7EB80E>(${com}/${count})</color></b>`
|
|
|
+ if(com >= count)
|
|
|
+ {
|
|
|
+ this.node_hand.active = true;
|
|
|
+ }else{
|
|
|
+ this.node_hand.active = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
gData.gameData.init_task = false;
|