wuwangdong há 4 anos atrás
pai
commit
d4d1a007b1

+ 4 - 1
assets/resources/module/redBagTask/redBagTask.prefab

@@ -747,7 +747,7 @@
       "__id__": 16
     },
     "_children": [],
-    "_active": true,
+    "_active": false,
     "_components": [
       {
         "__id__": 18
@@ -5306,6 +5306,9 @@
     "lbl_taskDes": {
       "__id__": 92
     },
+    "node_videoIcon": {
+      "__id__": 17
+    },
     "_id": ""
   },
   {

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

@@ -312,6 +312,14 @@ export class AdData {
         mk.ad.showInterAd(1);
     }
 
+    checkShowVideoIcon()
+    {
+        if (this.FullCsahAdArr.indexOf(this.ecpmLevel.toString()) == -1) {
+            return false;
+        }
+        return true;
+    }
+
     //定时弹出计时
     private timeAd = 0;
     private test = true;

+ 6 - 0
assets/script/game/module/redBagTask/RedBagTask.ts

@@ -37,6 +37,8 @@ export default class RedBagTask extends cc.Component {
     private lbl_taskNum: cc.Label = null;
     @property({ type: cc.Label, displayName: '任务描述' })
     private lbl_taskDes: cc.Label = null;
+    @property(cc.Node)
+    private node_videoIcon: cc.Node = null;
 
     private isShowNewTask = true;
     private num = 0;
@@ -159,6 +161,10 @@ export default class RedBagTask extends cc.Component {
             }
 
             this.isCanCash = com >= count;
+            if(this.isCanCash &&  gData.adData.checkShowVideoIcon())
+            {
+                this.node_videoIcon.active = true;
+            }
         }
     }