kaka 5 лет назад
Родитель
Сommit
5610ce7acc
1 измененных файлов с 5 добавлено и 61 удалено
  1. 5 61
      assets/script/game/module/module/redeem/RedeemNode.ts

+ 5 - 61
assets/script/game/module/module/redeem/RedeemNode.ts

@@ -137,53 +137,12 @@ export default class RichHelpPanel extends cc.Component {
 
     async Click_GetBtn() {
         this.suc_node.active = false;
-        let richDice: any = null;
-
-        // for (let i = 0; i < this.rewardData.length; i++) {
-        //     if (this.rewardData[i].type == "10001") {
-        //         let coinNum = Sciencen_M.instance.accMul(GameM.commonData.goldSecond.toString(), (Number(this.rewardData[i].count) * 60).toString());
-        //         GameM.commonData.updateGold(coinNum);
-        //         GameM.audioM.playEffect(AUDIO_TYPE.getGold, false);
-        //         EffectNode.instance.PlayCoinAnim(0, 5, cc.v2(0, -300));
-        //     } else if (this.rewardData[i].type == "10002") {
-        //         GameM.commonData.updateRedMoney(Number(this.rewardData[i].count))
-        //         EffectNode.instance.PlayCoinAnim(1, 5, cc.v2(0, -300));
-        //     } else if (this.rewardData[i].type == "20002") {
-        //         GameM.commonData.roleData.turntableCard += Number(this.rewardData[i].count);
-        //         EffectNode.instance.PlayCoinAnim(11, 5, cc.v2(0, -300));
-        //     } else if (this.rewardData[i].type == "20001") {
-        //         GameM.commonData.roleData.speedCard += Number(this.rewardData[i].count);
-        //         EffectNode.instance.PlayCoinAnim(10, 5, cc.v2(0, -300));
-        //     } else if (this.rewardData[i].type == "20003") {
-        //         GameM.commonData.roleData.ticket += Number(this.rewardData[i].count);
-        //         EffectNode.instance.PlayCoinAnim(12, 5, cc.v2(0, -300));
-        //     } else if (this.rewardData[i].type == "20006") {
-        //         MateData.Ins.talentCoin += Number(this.rewardData[i].count)
-        //         GameM.httpM.SendData(HTTP_TYPE.updateBattleStoneCount, { "count": MateData.Ins.talentCoin })
-        //         EffectNode.instance.PlayCoinAnim(13, 5, cc.v2(0, -300));
-        //     } else if (this.rewardData[i].type == "30001") {
-        //         if (richDice == null) richDice = {};
-        //         richDice.diceAdNum = Number(this.rewardData[i].count);
-        //         EffectNode.instance.PlayCoinAnim(6, 5, cc.v2(0, -300));
-        //     } else if (this.rewardData[i].type == "30002") {
-        //         if (richDice == null) richDice = {};
-        //         richDice.remoteCtrlNum = Number(this.rewardData[i].count);
-        //         EffectNode.instance.PlayCoinAnim(7, 5, cc.v2(0, -300));
-        //     } else if (this.rewardData[i].type == "30004") {
-        //         if (richDice == null) richDice = {};
-        //         richDice.scriptureNum = Number(this.rewardData[i].count);
-        //         EffectNode.instance.PlayCoinAnim(9, 5, cc.v2(0, -300));
-        //     } else if (this.rewardData[i].type == "30005") {
-        //         if (richDice == null) richDice = {};
-        //         richDice.doubleNum = Number(this.rewardData[i].count);
-        //         EffectNode.instance.PlayCoinAnim(8, 5, cc.v2(0, -300));
-        //     }
-        // }
 
-        // if (richDice != null) {
-        //     //进入取经战斗 前提就是满足奖励条件下
-        //     RichData.Ins.UpdateItemCard2(richDice, null, false);
-        // }
+        for (let i = 0; i < this.rewardData.length; i++) {
+            mk.audio.playEffect('rewardClose');
+            mk.fly.PlayCoinAnim(this.rewardData[i].type, 5, cc.v2(0, -300), cc.v2(0, 0))
+        }
+
 
         let response = await gData.redeem.redeemGetRedemption();
         // if (response && response.data.code == 1) {
@@ -193,21 +152,6 @@ export default class RichHelpPanel extends cc.Component {
 
         // }
 
-        // HttpM.Instance.SendData(HTTP_TYPE.redeemGetRedemption, {}, (res) => {
-        //     console.log("--->RedeemGift RedeemPanel:", res);
-        //     if (res.data != null && res.errcode == 0) {
-        //         GameM.commonData.redeemData = res.data;
-        //         UiM.Instance.hallNode.getComponent(Main).redeemBtn.active = res.data.code == 1;
-        //         if (res.data.code == 1) {
-        //             this.InitData();
-        //         } else {
-        //             UiM.Instance.offPanel(PANEL_NAME.RedeemNode);
-        //         }
-        //     } else {
-        //         UiM.Instance.offPanel(PANEL_NAME.RedeemNode);
-        //     }
-        // });
-
         // AdM.onSendEvent('duihuan_success', '兑换码-兑换成功', 'duihuan')
     }
 }