Przeglądaj źródła

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

zhengniehua 5 lat temu
rodzic
commit
c07477b9ad

+ 9 - 9
tower_sanguo/assets/resources/module/generalUpStar/general_up_star.prefab

@@ -3311,7 +3311,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 45.23,
+      "width": 79.45,
       "height": 50.4
     },
     "_anchorPoint": {
@@ -3323,7 +3323,7 @@
       "__type__": "TypedArray",
       "ctor": "Float64Array",
       "array": [
-        -42.077,
+        -46,
         -79.004,
         0,
         0,
@@ -3362,8 +3362,8 @@
       }
     ],
     "_useOriginalSize": false,
-    "_string": "100",
-    "_N$string": "100",
+    "_string": "12345",
+    "_N$string": "12345",
     "_fontSize": 30,
     "_lineHeight": 40,
     "_enableWrapText": true,
@@ -3432,7 +3432,7 @@
       "__type__": "TypedArray",
       "ctor": "Float64Array",
       "array": [
-        -100.029,
+        -115,
         -79.004,
         0,
         0,
@@ -3961,7 +3961,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 45.23,
+      "width": 79.45,
       "height": 50.4
     },
     "_anchorPoint": {
@@ -3973,7 +3973,7 @@
       "__type__": "TypedArray",
       "ctor": "Float64Array",
       "array": [
-        76.442,
+        80,
         -79.004,
         0,
         0,
@@ -4012,8 +4012,8 @@
       }
     ],
     "_useOriginalSize": false,
-    "_string": "120",
-    "_N$string": "120",
+    "_string": "54321",
+    "_N$string": "54321",
     "_fontSize": 30,
     "_lineHeight": 40,
     "_enableWrapText": true,

+ 3 - 2
tower_sanguo/assets/scripts/module/checkpointRedBag/CheckpointRedBagBtn.ts

@@ -18,7 +18,7 @@ export default class CheckpointRedBagBtn extends cc.Component {
         XXEvent.on('event-get-checkpoint-redbag', this.onAddRedBag, this);
         XXEvent.on('event-monster-died', this.onMonsterDied, this);
         XXEvent.on(XXConst.EventNewMissionStart, this.onNewMissionStart, this)// 新的一波开始了
-        XXEvent.on('http-stage-getStageReward', this.onReciveTVRewardCall, this);
+        XXEvent.on('http-stage-getStageReward', this.onReciveTVRewardCall, this);// 领取通关红包币
     }
 
     start() {
@@ -54,7 +54,8 @@ export default class CheckpointRedBagBtn extends cc.Component {
     private onReciveTVRewardCall(reply) {
         cc.log(reply)
         // 处理数据
-        CheckpointRedBagModle.onClickCal();
+        // 数量-1
+        CheckpointRedBagModle.onReciveTVRewardCall(reply);
 
         let time = CheckpointRedBagModle.redbag_data.cur_count - this.targetProgress;
         this.targetProgress = CheckpointRedBagModle.redbag_data.cur_count;

+ 21 - 19
tower_sanguo/assets/scripts/module/checkpointRedBag/CheckpointRedBagModle.ts

@@ -84,8 +84,8 @@ export default class CheckpointRedBagModle {
     public static requestRedBag(world_pos: cc.Vec2) {
         if (this.cur_is_get) return;
         if (!this.isGetRedBag()) return;
-        if (this.redbag_data.cumulative_count >= this.redbag_data.limit_count) return;
-        if (this.redbag_data.cur_count >= this.redbag_data.limit_count) return;
+        if (this.redbag_data.cumulative_count && this.redbag_data.limit_count && this.redbag_data.cumulative_count >= this.redbag_data.limit_count) return;
+        if (this.redbag_data.cur_count && this.redbag_data.limit_count && this.redbag_data.cur_count >= this.redbag_data.limit_count) return;
         this.redBag_world_pos = world_pos;
         // 掉落请求
         GameController.http.saveStageReward();
@@ -101,13 +101,13 @@ export default class CheckpointRedBagModle {
             // "stageRewardVideoTime": Integer (用户通关红包视频次数)
     */
     public static saveStageRewardCall(reply) {
-        cc.log('怪物掉落红包币:', reply)
+        cc.log('怪物掉落红包币结果:', reply)
         let data = reply.data;
         if (data && data.code === 1) {
             let data2 = data.data;
-            this.redbag_data.cur_count = data2.stageRewardRedBag;
-            this.redbag_data.cumulative_count = data2.stageRewardDrop;
-            let t_limit_count = data2.stageRewardNum + data2.stageRewardDrop;// 限制次数 = 剩余次数 + 当日累计
+            this.redbag_data.cur_count = data2.StageRewardRedBag;
+            this.redbag_data.cumulative_count = data2.StageRewardDrop;
+            let t_limit_count = data2.StageRewardNum + data2.StageRewardDrop;// 限制次数 = 剩余次数 + 当日累计
             this.redbag_data.limit_count = t_limit_count;
 
 
@@ -132,27 +132,29 @@ export default class CheckpointRedBagModle {
         if (!this.redbag_data.cur_count) {
             GameController.uiM.showToast('挂机可以产生红包');
         } else {
-            // 看视频
-            // 数量-1
-            this.subCount();
+            // 领取视频红包请求
+            GameController.http.getStageReward();
         }
     }
-    /** 红包币掉落 */
-    private static getRegBagByMonster() {
-
-    }
-    /** 掉落的红包币飞往 通关红包币仓库 */
-    private static flySaveNode() {
-
-    }
     /** 数量增加 */
     public static addCount() {
         this.redbag_data.cur_count += 1;
         this.saveCheckpointRedBag();
     }
     /** 数量减少 */
-    private static subCount() {
-        this.lookVideoCall();
+    public static onReciveTVRewardCall(reply) {
+        cc.log('领取通关红包币结果:', reply)
+        let data = reply.data;
+        if (data && data.code === 1) {
+            let data2 = data.data;
+            this.redbag_data.cur_count = data2.StageRewardRedBag;
+            this.redbag_data.cumulative_count = data2.StageRewardDrop;
+            let t_limit_count = data2.StageRewardNum + data2.StageRewardDrop;// 限制次数 = 剩余次数 + 当日累计
+            this.redbag_data.limit_count = t_limit_count;
+            this.lookVideoCall();
+        } else {
+
+        }
     }
     /** 看完视频回调 */
     private static lookVideoCall() {

+ 1 - 1
tower_sanguo/assets/scripts/module/gm/GmUI.ts

@@ -212,7 +212,7 @@ export default class GmUI extends BaseUI {
         let brr = this.lbl_input.string.split(" ");
         GameController.http.updateKeyValueDemo((data) => {
             GameController.gameData.player.setProp(parseInt(brr[0]), parseInt(brr[1]));
-        }, obj[brr[0]], brr[1]);
+        }, obj[brr[0]], parseInt(brr[1]));
     }
 
     private addGeneral() {