|
|
@@ -181,20 +181,18 @@ 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;
|
|
|
- if(gData.gameData.init_redBagTask)
|
|
|
- {
|
|
|
+ if (gData.gameData.init_redBagTask) {
|
|
|
this.lbl_task.string = `<b><color=#8D4D32>点击领取任务!</c></b>`
|
|
|
this.node_hand.active = true;
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this.lbl_task.string = `<b><color=#8D4D32>进行${count}次生产</c><color=#7EB80E>(${com}/${count})</color></b>`
|
|
|
- if(com >= count)
|
|
|
- {
|
|
|
+ if (com >= count) {
|
|
|
this.node_hand.active = true;
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this.node_hand.active = false;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|
|
|
@@ -216,16 +214,14 @@ 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;
|
|
|
- if(gData.gameData.init_redBagTask)
|
|
|
- {
|
|
|
+ if (gData.gameData.init_redBagTask) {
|
|
|
this.lbl_task.string = `<b><color=#8D4D32>点击领取任务!</c></b>`
|
|
|
this.node_hand.active = true;
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this.lbl_task.string = `<b><color=#8D4D32>进行${count}次生产</c><color=#7EB80E>(${com}/${count})</color></b>`
|
|
|
- if(com >= count)
|
|
|
- {
|
|
|
+ if (com >= count) {
|
|
|
this.node_hand.active = true;
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this.node_hand.active = false;
|
|
|
}
|
|
|
}
|
|
|
@@ -424,17 +420,17 @@ export default class Game extends cc.Component {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- gData.gameData.makeProduct();
|
|
|
-
|
|
|
+ let flyRed = gData.gameData.makeProduct();
|
|
|
|
|
|
- let pos = this.node_taskHb.parent.convertToWorldSpaceAR(this.node_taskHb.getPosition());
|
|
|
- mk.fly.PlayCoinAnim(1, 3, this.btn_product, pos, () => {
|
|
|
- gData.gameData.init_task = true;
|
|
|
- }, 1)
|
|
|
+ if (flyRed) {
|
|
|
+ let pos = this.node_taskHb.parent.convertToWorldSpaceAR(this.node_taskHb.getPosition());
|
|
|
+ mk.fly.PlayCoinAnim(1, 3, this.btn_product, pos, () => {
|
|
|
+ gData.gameData.init_task = true;
|
|
|
+ }, 0.8);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
public doFlyExpAni(exp: number, startPos: cc.Node, data) {
|
|
|
let pos = this.lbl_farmLevel.node.parent.convertToWorldSpaceAR(this.lbl_farmLevel.node.getPosition());
|
|
|
mk.fly.PlayCoinAnim(2, 3, startPos, pos, () => {
|