Просмотр исходного кода

Merge branch 'master' of http://git.mokasz.com/zouyong/mk_framework

zouyong 5 лет назад
Родитель
Сommit
03eec7f21b

+ 0 - 12
assets/res/audio.meta

@@ -1,12 +0,0 @@
-{
-  "ver": "1.1.2",
-  "uuid": "160477ed-e2d0-4ee6-95f7-965820ef4f7d",
-  "isBundle": false,
-  "bundleName": "",
-  "priority": 1,
-  "compressionType": {},
-  "optimizeHotUpdate": {},
-  "inlineSpriteFrames": {},
-  "isRemoteBundle": {},
-  "subMetas": {}
-}

+ 1 - 3
assets/resources/game/prefab/coin.prefab

@@ -88,9 +88,7 @@
     ],
     "_srcBlendFactor": 770,
     "_dstBlendFactor": 771,
-    "_spriteFrame": {
-      "__uuid__": "8e888a59-b8e7-4546-b3cb-dbbd43868bee"
-    },
+    "_spriteFrame": null,
     "_type": 0,
     "_sizeMode": 1,
     "_fillType": 0,

+ 1 - 1
assets/resources/game/texture/coin.meta

@@ -1,6 +1,6 @@
 {
   "ver": "1.1.2",
-  "uuid": "fd6022f1-a800-43dc-a353-2a6718269f58",
+  "uuid": "f7b396a4-06fa-4681-a126-260bce6d8098",
   "isBundle": false,
   "bundleName": "",
   "priority": 1,

+ 3 - 3
assets/resources/game/texture/coin/1.png.meta

@@ -1,6 +1,6 @@
 {
   "ver": "2.3.5",
-  "uuid": "e68efa46-3c62-428e-906b-86ebabbe2895",
+  "uuid": "7fcbfa5b-f738-4989-ac5a-e2066a7db637",
   "type": "sprite",
   "wrapMode": "clamp",
   "filterMode": "bilinear",
@@ -13,8 +13,8 @@
   "subMetas": {
     "1": {
       "ver": "1.0.4",
-      "uuid": "1b708b3d-ca74-4900-8c9a-7e0bf185c7b1",
-      "rawTextureUuid": "e68efa46-3c62-428e-906b-86ebabbe2895",
+      "uuid": "487aa335-4ecc-49fd-a6d9-65ce8e276d0f",
+      "rawTextureUuid": "7fcbfa5b-f738-4989-ac5a-e2066a7db637",
       "trimType": "auto",
       "trimThreshold": 1,
       "rotated": false,

+ 3 - 3
assets/resources/game/texture/coin/2.png.meta

@@ -1,6 +1,6 @@
 {
   "ver": "2.3.5",
-  "uuid": "09eed7cf-fe10-4c65-80be-3c1127c08b8c",
+  "uuid": "998f42c1-485d-4322-9a9e-b55bed6480b7",
   "type": "sprite",
   "wrapMode": "clamp",
   "filterMode": "bilinear",
@@ -13,8 +13,8 @@
   "subMetas": {
     "2": {
       "ver": "1.0.4",
-      "uuid": "651c5ef1-03f7-4f67-940e-a12d7e827579",
-      "rawTextureUuid": "09eed7cf-fe10-4c65-80be-3c1127c08b8c",
+      "uuid": "451780cc-ede2-44e3-871d-a643e547484c",
+      "rawTextureUuid": "998f42c1-485d-4322-9a9e-b55bed6480b7",
       "trimType": "auto",
       "trimThreshold": 1,
       "rotated": false,

+ 3 - 3
assets/resources/game/texture/coin/3.png.meta

@@ -1,6 +1,6 @@
 {
   "ver": "2.3.5",
-  "uuid": "f47be175-66ef-4e4c-84a7-b769e59e2b0d",
+  "uuid": "05073b59-66e4-4cf2-b066-d7e9084467d6",
   "type": "sprite",
   "wrapMode": "clamp",
   "filterMode": "bilinear",
@@ -13,8 +13,8 @@
   "subMetas": {
     "3": {
       "ver": "1.0.4",
-      "uuid": "d2e19f95-a799-4b98-bc8d-426051e9e260",
-      "rawTextureUuid": "f47be175-66ef-4e4c-84a7-b769e59e2b0d",
+      "uuid": "1042a639-32ff-4fa5-935c-fda10ffbc43a",
+      "rawTextureUuid": "05073b59-66e4-4cf2-b066-d7e9084467d6",
       "trimType": "auto",
       "trimThreshold": 1,
       "rotated": false,

+ 8 - 20
assets/resources/module/redeem/RedeemNode.prefab

@@ -1375,8 +1375,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 91,
-      "height": 91
+      "width": 70,
+      "height": 70
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -1427,9 +1427,7 @@
     ],
     "_srcBlendFactor": 770,
     "_dstBlendFactor": 771,
-    "_spriteFrame": {
-      "__uuid__": "8e888a59-b8e7-4546-b3cb-dbbd43868bee"
-    },
+    "_spriteFrame": null,
     "_type": 0,
     "_sizeMode": 1,
     "_fillType": 0,
@@ -2204,9 +2202,7 @@
     ],
     "_srcBlendFactor": 770,
     "_dstBlendFactor": 771,
-    "_spriteFrame": {
-      "__uuid__": "8e888a59-b8e7-4546-b3cb-dbbd43868bee"
-    },
+    "_spriteFrame": null,
     "_type": 0,
     "_sizeMode": 1,
     "_fillType": 0,
@@ -2981,9 +2977,7 @@
     ],
     "_srcBlendFactor": 770,
     "_dstBlendFactor": 771,
-    "_spriteFrame": {
-      "__uuid__": "8e888a59-b8e7-4546-b3cb-dbbd43868bee"
-    },
+    "_spriteFrame": null,
     "_type": 0,
     "_sizeMode": 1,
     "_fillType": 0,
@@ -6643,9 +6637,7 @@
     ],
     "_srcBlendFactor": 770,
     "_dstBlendFactor": 771,
-    "_spriteFrame": {
-      "__uuid__": "8e888a59-b8e7-4546-b3cb-dbbd43868bee"
-    },
+    "_spriteFrame": null,
     "_type": 0,
     "_sizeMode": 1,
     "_fillType": 0,
@@ -7420,9 +7412,7 @@
     ],
     "_srcBlendFactor": 770,
     "_dstBlendFactor": 771,
-    "_spriteFrame": {
-      "__uuid__": "8e888a59-b8e7-4546-b3cb-dbbd43868bee"
-    },
+    "_spriteFrame": null,
     "_type": 0,
     "_sizeMode": 1,
     "_fillType": 0,
@@ -8197,9 +8187,7 @@
     ],
     "_srcBlendFactor": 770,
     "_dstBlendFactor": 771,
-    "_spriteFrame": {
-      "__uuid__": "8e888a59-b8e7-4546-b3cb-dbbd43868bee"
-    },
+    "_spriteFrame": null,
     "_type": 0,
     "_sizeMode": 1,
     "_fillType": 0,

+ 2 - 0
assets/script/game/data/GData.ts

@@ -99,6 +99,7 @@ class GData {
         this.moduleData.set(Fun.sign, this.sign);
         this.moduleData.set(Fun.cashNormal, this.cashNormal);
         this.moduleData.set(Fun.redBagCash, this.redBagCash);
+        this.moduleData.set(Fun.redeem, this.redeem);
     }
 }
 
@@ -114,6 +115,7 @@ export enum Fun {
     sign = 6,       //签到
     cashNormal = 7, //常规提现
     redBagCash = 8, //红包提现
+    redeem = 9,     //兑换码
 }
 
 declare global {

+ 4 - 0
assets/script/game/data/module/RedeemData.ts

@@ -18,6 +18,10 @@ export default class RedeemData extends Data {
         return this._redeemData;
     }
 
+    init() {
+        this.redeemGetRedemption();
+    }
+
     /**兑换礼包*/
     async redeemExchange(input: string) {
         let data = { code: input };

+ 2 - 2
assets/script/game/game/Game.ts

@@ -59,8 +59,8 @@ export default class Game extends cc.Component {
 
     //测试道具获取效果
     private testFly() {
-        mk.fly.PlayCoinAnim(10001, 20, cc.v2(0, -300), cc.v2(0, 0));
-        // mk.fly.PlayCoinAnim(10002, 20, cc.v2(0, -300), 'Canvas/界面层/game/功能按钮/右侧按钮/btn2');
+        mk.fly.PlayCoinAnim(1, 20, cc.v2(0, -300), cc.v2(0, 0));
+        // mk.fly.PlayCoinAnim(2, 20, cc.v2(0, -300), 'Canvas/界面层/game/功能按钮/右侧按钮/btn2');
     }
 
     update() {

+ 1 - 1
assets/script/game/module/module/blessingBag/BlessingBag.ts

@@ -123,7 +123,7 @@ export default class BlessingBag extends cc.Component {
 
         if (gData.blessingBag.isPlayAniUpdate) {
             if (this.lastNum < data.cumulativeAmount) {
-                mk.fly.PlayCoinAnim(10001, 10, this.btnAd.getPosition(), this.btnCash.getPosition(), () => {
+                mk.fly.PlayCoinAnim(1, 10, this.btnAd.getPosition(), this.btnCash.getPosition(), () => {
                     this.aniBigAdBtn.setCurrentTime(0);
                     this.aniBigAdBtn.play();
                 });

+ 1 - 1
assets/script/game/module/module/moreGame/MoreGamePopNode.ts

@@ -71,6 +71,6 @@ export default class MoreGamePopNode extends cc.Component {
         // mk.audio.playEffect('getGold');
         mk.tip.pop('红包币+300');
         //     GameM.commonData.updateRedMoney(300, RecordTYPE.online)
-        mk.fly.PlayCoinAnim(10001, 20, cc.v2(0, -300), cc.v2(0, 0));
+        mk.fly.PlayCoinAnim(1, 20, cc.v2(0, -300), cc.v2(0, 0));
     }
 }

+ 6 - 62
assets/script/game/module/module/redeem/RedeemNode.ts

@@ -65,7 +65,7 @@ export default class RichHelpPanel extends cc.Component {
         for (let i = 0; i < this.rewardData.length; i++) {
             this.rds[i].active = true;
             this.suc_rds[i].active = true;
-            cc.loader.loadRes("module/icon/reward" + this.rewardData[i].type, cc.SpriteFrame, (err, res) => {
+            cc.loader.loadRes("game/texture/coin/" + this.rewardData[i].type, cc.SpriteFrame, (err, res) => {
                 if (err) { console.log("img load err:" + JSON.stringify(err)); }
                 this.rd_imgs[i].spriteFrame = res;
                 this.suc_rd_imgs[i].spriteFrame = res;
@@ -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')
     }
 }

+ 1 - 1
assets/script/mk/system/FlySystem.ts

@@ -20,7 +20,7 @@ export default class FlySystem extends cc.Component {
     public async PlayCoinAnim(type: number = 0, num: number, pos: cc.Vec2, endpos: cc.Vec2 | string, cb: Function = null) {
         for (let i = 0; i < num; i++) {
             let copyCoin = await mk.pool.getPrefab('game/prefab/coin');
-            let url = 'module/icon/reward' + type;
+            let url = 'game/texture/coin/' + type;
             let sf = await mk.loader.load(url, cc.SpriteFrame);
             copyCoin.getComponent(cc.Sprite).spriteFrame = sf;
             copyCoin.setParent(this.node);