wuwangdong 4 tahun lalu
induk
melakukan
88da247bc5

+ 136 - 25
assets/resources/module/newNotice/lineUpUI.prefab

@@ -24,20 +24,20 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 40
+        "__id__": 43
       },
       {
-        "__id__": 41
+        "__id__": 44
       },
       {
-        "__id__": 42
+        "__id__": 45
       },
       {
-        "__id__": 43
+        "__id__": 46
       }
     ],
     "_prefab": {
-      "__id__": 44
+      "__id__": 47
     },
     "_opacity": 255,
     "_color": {
@@ -101,7 +101,7 @@
     "_active": true,
     "_components": [],
     "_prefab": {
-      "__id__": 39
+      "__id__": 42
     },
     "_opacity": 255,
     "_color": {
@@ -174,17 +174,17 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 35
+        "__id__": 38
       },
       {
-        "__id__": 36
+        "__id__": 39
       },
       {
-        "__id__": 37
+        "__id__": 40
       }
     ],
     "_prefab": {
-      "__id__": 38
+      "__id__": 41
     },
     "_opacity": 255,
     "_color": {
@@ -645,7 +645,7 @@
     "asset": {
       "__uuid__": "4f28d7f3-1d28-4320-bf91-516bb05e0c01"
     },
-    "fileId": "3erW1hU7lHdqLU1hVIsCsA",
+    "fileId": "d5Tde+iaNKppfcg7HeTv3G",
     "sync": false
   },
   {
@@ -754,7 +754,7 @@
     "asset": {
       "__uuid__": "4f28d7f3-1d28-4320-bf91-516bb05e0c01"
     },
-    "fileId": "fbCuY9QZxAQ4kWDPJHIAJA",
+    "fileId": "7915PVx3NGAKMwENfaMWiB",
     "sync": false
   },
   {
@@ -863,7 +863,7 @@
     "asset": {
       "__uuid__": "4f28d7f3-1d28-4320-bf91-516bb05e0c01"
     },
-    "fileId": "76X0Fb7MdCwYQkywS0OtN9",
+    "fileId": "97XHxTW/BCJYDqCKRWFbzV",
     "sync": false
   },
   {
@@ -911,19 +911,22 @@
       },
       {
         "__id__": 28
+      },
+      {
+        "__id__": 31
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 31
+        "__id__": 34
       },
       {
-        "__id__": 32
+        "__id__": 35
       }
     ],
     "_prefab": {
-      "__id__": 34
+      "__id__": 37
     },
     "_opacity": 255,
     "_color": {
@@ -1002,7 +1005,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 206,
+      "width": 174,
       "height": 69
     },
     "_anchorPoint": {
@@ -1014,7 +1017,7 @@
       "__type__": "TypedArray",
       "ctor": "Float64Array",
       "array": [
-        0,
+        26,
         5,
         0,
         0,
@@ -1056,7 +1059,7 @@
     "_dstBlendFactor": 771,
     "_string": "免费插队",
     "_N$string": "免费插队",
-    "_fontSize": 50,
+    "_fontSize": 42,
     "_lineHeight": 50,
     "_enableWrapText": true,
     "_N$file": {
@@ -1142,13 +1145,13 @@
       "__type__": "TypedArray",
       "ctor": "Float64Array",
       "array": [
-        122.595,
-        48.054,
-        0,
+        -90.589,
+        6.672000000000001,
         0,
         0,
         0,
-        1,
+        -0.06104853953485687,
+        0.9981347984218669,
         1,
         1,
         1
@@ -1158,7 +1161,7 @@
       "__type__": "cc.Vec3",
       "x": 0,
       "y": 0,
-      "z": 0
+      "z": -7
     },
     "_skewX": 0,
     "_skewY": 0,
@@ -1211,6 +1214,113 @@
     "sync": false
   },
   {
+    "__type__": "cc.Node",
+    "_name": "redBag",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 23
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 32
+      }
+    ],
+    "_prefab": {
+      "__id__": 33
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 47,
+      "height": 51
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        128.732,
+        36.53,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1.1,
+        1.1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 31
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "12024505-27ec-4112-acb5-1a78b1315c9b"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "4f28d7f3-1d28-4320-bf91-516bb05e0c01"
+    },
+    "fileId": "87fzknNDRO+rsuN+/IgZiy",
+    "sync": false
+  },
+  {
     "__type__": "cc.Sprite",
     "_name": "",
     "_objFlags": 0,
@@ -1256,7 +1366,7 @@
     "zoomScale": 1.2,
     "clickEvents": [
       {
-        "__id__": 33
+        "__id__": 36
       }
     ],
     "_N$interactable": true,
@@ -1407,6 +1517,7 @@
     },
     "_enabled": false,
     "isFitSpecialNode": true,
+    "offset": 80,
     "_id": ""
   },
   {

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

@@ -64,6 +64,7 @@ export class AdData {
         this.adMap.set(AdFun.cashOutAddCash, gData.walletCashOutData);
         this.adMap.set(AdFun.harvest, gData.harvestData);
         this.adMap.set(AdFun.farmMap, gData.farmMapData);
+        this.adMap.set(AdFun.lineUp, gData.lineUpUIData);
     }
 
     /**
@@ -432,4 +433,5 @@ export enum AdFun {
     cashOutAddCash = 8, //钱包提现加现金视频
     harvest = 9,        //收获超级加倍视频
     farmMap = 10,       //图鉴领取视频
+    lineUp = 11,        //插队视频
 }

+ 4 - 0
assets/script/game/data/GameData.ts

@@ -100,6 +100,9 @@ export class GameData {
     /** 生虫/生病/停电当前个数 */
     public RawInsectCurArr = [0, 0, 0];
 
+    //恢复生产次数
+    public restoreProductTimes = 0;
+
     /**
      * 初始化游戏数据:网络配置信息,用户信息
      * @returns 
@@ -1517,6 +1520,7 @@ export enum VideoAdType {
     video_init_18 = '离开游戏领红包',
     video_init_19 = '定时弹出红包',
     video_init_20 = '插队',
+    video_init_21 = '恢复生产次数',
 }
 
 export enum InterFullAdType {

+ 25 - 0
assets/script/game/data/module/LineUpUIData.ts

@@ -1,4 +1,5 @@
 import { Data } from "../../../mk/data/Data";
+import { RewardType } from "../GameData";
 
 
 export class LineUpUIData extends Data {
@@ -6,4 +7,28 @@ export class LineUpUIData extends Data {
     public personCount = 0;
     public cashId = 0;
     public refresh = false;
+    public redMoney = 0;
+
+
+
+    setAdData(data) {
+        //mk.console.logSingle('LineUpUIData  addata ', this.adData);
+        super.setAdData(data);
+
+        this.redMoney = 0;
+        let rewardData = gData.lineUpUIData.adData.videoRedMoney.videoRewardList;
+        for(let i = 0; i != rewardData.length; ++i)
+        {
+            if(rewardData[i].rewardType == RewardType.redBag)
+            {
+                this.redMoney = rewardData[i].rewardNum;
+                break;
+            }
+        }
+
+        gData.reward.data = gData.lineUpUIData.adData.videoRedMoney.videoRewardList;
+        // let world_Pos = this.node_fly.parent.convertToWorldSpaceAR(this.node_fly.getPosition());
+        // gData.reward.getReward(world_Pos);
+
+    }
 }

+ 2 - 1
assets/script/game/data/module/WalletCashOutData.ts

@@ -4,6 +4,7 @@
  * @description 提现数据
  */
 import { Data } from "../../../mk/data/Data";
+import { AdFun } from "../AdData";
 import { DataEventId } from "../GameData";
 
 export class WalletCashOutData extends Data {
@@ -56,7 +57,7 @@ export class WalletCashOutData extends Data {
         mk.console.logSingle('wallet2=>', response);
         if (response.errcode != 0) {
             if (response.data.count > 0) {
-                // gData.cashPro.init_fail = true;
+                // gData.cashPro.init_fail = true;  
                 gData.lineUpUIData.personCount = response.data.count;
                 gData.lineUpUIData.cashId = id;
                 gData.lineUpUIData.refresh = true;

+ 14 - 1
assets/script/game/game/Game.ts

@@ -83,6 +83,8 @@ export default class Game extends cc.Component {
 
     private autoPopSign = true;
 
+    private isShowAddProductTimesUI = false;
+
     onLoad() {
         this.posY = this.ani_add2.y;
         this.ani_add.node.active = false;
@@ -158,10 +160,11 @@ export default class Game extends cc.Component {
 
         gData.gameData.firstCheckNext();
 
+        let add = 0;
         if (gData.gameData.leftTimes < gData.gameData.maxTimes && this.lastTimeSpan != 0) {
             let pass = Date.now() - this.lastTimeSpan;
             if (pass >= this.span) {
-                let add = Math.floor(pass / this.span);
+                add = Math.floor(pass / this.span);
                 this.lastTimeSpan += (add * this.span);
                 mk.storage.setStorage('lastTimeSpan', this.lastTimeSpan);
                 gData.gameData.changeLeftTimes(add);
@@ -169,6 +172,16 @@ export default class Game extends cc.Component {
                 gData.gameData.init_leftTimes = true;
             }
         }
+
+        if(!this.isShowAddProductTimesUI)
+        {
+            this.isShowAddProductTimesUI = true;
+            if(add > 0)
+            {
+                gData.gameData.restoreProductTimes = add;
+                mk.ui.openPanel('module/speedUpUI/restoreProductTimes');
+            }
+        }
     }
     lateUpdate() {
         gData.gameData.init_head = false;

+ 5 - 4
assets/script/game/module/blessingBag/BlessingBag.ts

@@ -199,10 +199,11 @@ export default class BlessingBag extends cc.Component {
     Click_AdProgressBtn() {
 
         mk.audio.playEffect("button");
-        if (gData.blessingBag.videoRbData.isVideo == 1) {
-            //免费加进度
-            gData.blessingBag.addProgress();
-        } else {
+        // if (gData.blessingBag.videoRbData.isVideo == 1) {
+        //     //免费加进度
+        //     gData.blessingBag.addProgress();
+        // } else 
+        {
             if (cc.sys.isNative && !gData.loginData.isAuth) {
                 // JsbSystem.WxAuth();
                 mk.ui.openPanel('module/authUI/authUI');

+ 3 - 2
assets/script/game/module/newNotice/LineUpUI.ts

@@ -1,4 +1,5 @@
 import AdSystem from "../../../mk/system/AdSystem";
+import { AdFun } from "../../data/AdData";
 import { VideoAdType } from "../../data/GameData";
 
 
@@ -26,7 +27,7 @@ export default class LineUpUI extends cc.Component {
             gData.lineUpUIData.refresh = false;
             this.lbl_tip.string = `<color=#8A4312>提现排队中,你前面还有</c><color=#EF2417>${gData.lineUpUIData.personCount}</color><color=#8A4312>人</color>`;
             cc.tween( this.lbl_tip.node).to(0.3, {scale: 1.4}).to(0.2, {scale: 1}).call(()=>{
-                mk.tip.pop('插队成功');
+                mk.tip.pop(`插队成功,并获得${gData.lineUpUIData.redMoney}红包币`);
             }).start();
         }
     }
@@ -39,7 +40,7 @@ export default class LineUpUI extends cc.Component {
             mk.console.log("watchAD:" + success);
             if (success) {
                 mk.ad.videoAdType = VideoAdType.video_init_20;
-                await gData.adData.watchVideo(null);
+                await gData.adData.watchVideo(AdFun.lineUp);
                 gData.walletCashOutData.HttpCashOut2(gData.walletCashOutData.curID);
                 //gData.walletCashOutData.HttpCashOut2(gData.lineUpUIData.cashId);
             }

+ 4 - 2
assets/script/game/module/turntable/Turnable.ts

@@ -146,12 +146,14 @@ export default class Turnable extends cc.Component {
         //已抽奖次数
         let times = 10 - gData.turnable.leftTimes;
         if (times == 0)
-            this.lbl_probability.string = `<color=#FBE5D0>当前概率: 5%</color>`;
+            this.lbl_probability.string = `<color=#FBE5D0>当前概率: 45%</color>`;
         else {
             if (times >= 10) {
                 times = 9;
             }
-            this.lbl_probability.string = `<color=#FBE5D0>当前概率: 5%</c><color=#A3FF0A>+${times * 10}%</color>`;
+            let rate = times * 5 + 45;
+            //this.lbl_probability.string = `<color=#FBE5D0>当前概率: 5%</c><color=#A3FF0A>+${rate}%</color>`;
+            this.lbl_probability.string = `<color=#FBE5D0>当前概率: ${rate}%</color>`;
         }
     }