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

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

kaka 5 лет назад
Родитель
Сommit
4b3f5afb1b
26 измененных файлов с 874 добавлено и 423 удалено
  1. 462 207
      assets/resources/game/prefab/game.prefab
  2. 191 135
      assets/resources/game/prefab/gameplay.prefab
  3. 12 12
      assets/resources/module/blessingBag/blessingBag.prefab
  4. 1 1
      assets/resources/module/guide/guide.prefab
  5. 12 0
      assets/resources/module/hotUpdate/perfab.meta
  6. 28 39
      assets/resources/module/moreGame/moreGamePopNode.prefab
  7. 10 2
      assets/script/before/GamePlay.ts
  8. 3 3
      assets/script/before/util/GameLogic.ts
  9. 3 2
      assets/script/before/view/uiItem/CellItem.ts
  10. 39 1
      assets/script/game/data/GameData.ts
  11. 3 0
      assets/script/game/data/module/CashProData.ts
  12. 52 4
      assets/script/game/game/Game.ts
  13. 5 0
      assets/script/game/module/blessingBag/BlessingBag.ts
  14. 11 2
      assets/script/game/module/guide/Guide.ts
  15. 2 1
      assets/script/game/module/moreGame/MoreGameNormalItem.ts
  16. 2 1
      assets/script/game/module/moreGame/MoreGamePicItem.ts
  17. 2 1
      assets/script/game/module/moreGame/MoreGamePopNode.ts
  18. 2 1
      assets/script/game/module/pigBank/PigBank.ts
  19. 2 1
      assets/script/game/module/redBagCash/RedBagCashItem.ts
  20. 6 1
      assets/script/game/module/sign/Sign.ts
  21. 2 0
      assets/script/game/module/turntable/Turnable.ts
  22. 3 1
      assets/script/mk/sdk/ad/toppon/AnyThinkAdsMgr/ATRewardVideo.ts
  23. 3 1
      assets/script/mk/system/AdSystem.ts
  24. 13 2
      assets/script/mk/system/DataSystem.ts
  25. 2 1
      assets/script/mk/system/GuideSystem.ts
  26. 3 4
      build/jsb-link/frameworks/runtime-src/proj.android-studio/app/src/org/cocos2dx/javascript/thirdSdk/ThirdSdkMgr.java

Разница между файлами не показана из-за своего большого размера
+ 462 - 207
assets/resources/game/prefab/game.prefab


Разница между файлами не показана из-за своего большого размера
+ 191 - 135
assets/resources/game/prefab/gameplay.prefab


+ 12 - 12
assets/resources/module/blessingBag/blessingBag.prefab

@@ -1272,7 +1272,7 @@
     "asset": {
       "__uuid__": "94760687-648e-4d1f-ac2f-169b0dc625d9"
     },
-    "fileId": "ea/U8lFalPA6mfioZ/fYXk",
+    "fileId": "ae6t2Dht1GG4RF+hWzVghO",
     "sync": false
   },
   {
@@ -1381,7 +1381,7 @@
     "asset": {
       "__uuid__": "94760687-648e-4d1f-ac2f-169b0dc625d9"
     },
-    "fileId": "5b7R/N4IROgbViEiJEzQGt",
+    "fileId": "3e7KKJ6PxHyIDgXC6tI01c",
     "sync": false
   },
   {
@@ -1490,7 +1490,7 @@
     "asset": {
       "__uuid__": "94760687-648e-4d1f-ac2f-169b0dc625d9"
     },
-    "fileId": "7e2ZxJBRpNBKYZtmvLldb5",
+    "fileId": "08UfN6oURA6bP1tfhG/MNg",
     "sync": false
   },
   {
@@ -3091,7 +3091,7 @@
     "asset": {
       "__uuid__": "94760687-648e-4d1f-ac2f-169b0dc625d9"
     },
-    "fileId": "e0+AKKP29Pcp4eSwPCgPDX",
+    "fileId": "b7UXPpcINPTZCU8gDdcy8q",
     "sync": false
   },
   {
@@ -3221,7 +3221,7 @@
     "asset": {
       "__uuid__": "94760687-648e-4d1f-ac2f-169b0dc625d9"
     },
-    "fileId": "cceHcPZm9PbYSCzFTBRlTM",
+    "fileId": "e0ZDeSvtVPDqay0j494nUe",
     "sync": false
   },
   {
@@ -3351,7 +3351,7 @@
     "asset": {
       "__uuid__": "94760687-648e-4d1f-ac2f-169b0dc625d9"
     },
-    "fileId": "d3kwf10VVCarBaEQzFmhlQ",
+    "fileId": "28NzgSbNFJzJB3imSokgIB",
     "sync": false
   },
   {
@@ -3481,7 +3481,7 @@
     "asset": {
       "__uuid__": "94760687-648e-4d1f-ac2f-169b0dc625d9"
     },
-    "fileId": "32L/jLzm5FAqrmT1uttOWd",
+    "fileId": "fb9MMncwZNGLxjnJ2cu+Dp",
     "sync": false
   },
   {
@@ -3611,7 +3611,7 @@
     "asset": {
       "__uuid__": "94760687-648e-4d1f-ac2f-169b0dc625d9"
     },
-    "fileId": "71YEkVz95IKaQF+rLcGABu",
+    "fileId": "6b2Osoh8JLtqJV98NHmjqS",
     "sync": false
   },
   {
@@ -3741,7 +3741,7 @@
     "asset": {
       "__uuid__": "94760687-648e-4d1f-ac2f-169b0dc625d9"
     },
-    "fileId": "73M33YvntO8aL69FqpAtv6",
+    "fileId": "36EsMFzQVL+KE0twXULYxu",
     "sync": false
   },
   {
@@ -3871,7 +3871,7 @@
     "asset": {
       "__uuid__": "94760687-648e-4d1f-ac2f-169b0dc625d9"
     },
-    "fileId": "c2hjk6kIdGx7zx5E2GjVTr",
+    "fileId": "6fLC6aooJEZb+/DtS12UYR",
     "sync": false
   },
   {
@@ -6713,7 +6713,7 @@
     "asset": {
       "__uuid__": "94760687-648e-4d1f-ac2f-169b0dc625d9"
     },
-    "fileId": "fdU2UCcU5Mr6bYm0X6kRNv",
+    "fileId": "9dznUjurBJo46esqIgWVPA",
     "sync": false
   },
   {
@@ -6822,7 +6822,7 @@
     "asset": {
       "__uuid__": "94760687-648e-4d1f-ac2f-169b0dc625d9"
     },
-    "fileId": "df48N5tmxHGJNxEZyvPC+v",
+    "fileId": "1bKHz+2ydHV6vK/TvqhE5I",
     "sync": false
   },
   {

+ 1 - 1
assets/resources/module/guide/guide.prefab

@@ -1164,7 +1164,7 @@
     "asset": {
       "__uuid__": "5f53c125-7a14-4ca0-986a-0e0d2d665268"
     },
-    "fileId": "735OBs8gpNxqHKVA7t6ETQ",
+    "fileId": "80Pou2FnNKnr67Y7RAlw1N",
     "sync": false
   },
   {

+ 12 - 0
assets/resources/module/hotUpdate/perfab.meta

@@ -0,0 +1,12 @@
+{
+  "ver": "1.1.2",
+  "uuid": "e45f4d0f-7aa3-4f6e-a64f-6b9bcde71855",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 28 - 39
assets/resources/module/moreGame/moreGamePopNode.prefab

@@ -21,26 +21,26 @@
         "__id__": 2
       },
       {
-        "__id__": 9
+        "__id__": 8
       },
       {
-        "__id__": 14
+        "__id__": 13
       },
       {
-        "__id__": 17
+        "__id__": 16
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 21
+        "__id__": 20
       },
       {
-        "__id__": 22
+        "__id__": 21
       }
     ],
     "_prefab": {
-      "__id__": 23
+      "__id__": 22
     },
     "_opacity": 255,
     "_color": {
@@ -110,7 +110,7 @@
       }
     ],
     "_prefab": {
-      "__id__": 8
+      "__id__": 7
     },
     "_opacity": 255,
     "_color": {
@@ -286,24 +286,11 @@
     "node_panel": {
       "__id__": 1
     },
-    "onComplete": [
-      {
-        "__id__": 7
-      }
-    ],
+    "transition_type": 0,
+    "onComplete": [],
     "_id": ""
   },
   {
-    "__type__": "cc.ClickEvent",
-    "target": {
-      "__id__": 1
-    },
-    "component": "",
-    "_componentId": "cd58fkToeZLvKuTEPhUbrbO",
-    "handler": "onClosePanel",
-    "customEventData": ""
-  },
-  {
     "__type__": "cc.PrefabInfo",
     "root": {
       "__id__": 1
@@ -325,17 +312,17 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 10
+        "__id__": 9
       },
       {
-        "__id__": 11
+        "__id__": 10
       },
       {
-        "__id__": 12
+        "__id__": 11
       }
     ],
     "_prefab": {
-      "__id__": 13
+      "__id__": 12
     },
     "_opacity": 255,
     "_color": {
@@ -389,7 +376,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 9
+      "__id__": 8
     },
     "_enabled": true,
     "_materials": [
@@ -421,7 +408,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 9
+      "__id__": 8
     },
     "_enabled": true,
     "_normalMaterial": null,
@@ -489,12 +476,13 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 9
+      "__id__": 8
     },
     "_enabled": true,
     "node_panel": {
       "__id__": 1
     },
+    "transition_type": 0,
     "onComplete": [],
     "_id": ""
   },
@@ -520,11 +508,11 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 15
+        "__id__": 14
       }
     ],
     "_prefab": {
-      "__id__": 16
+      "__id__": 15
     },
     "_opacity": 255,
     "_color": {
@@ -578,7 +566,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 14
+      "__id__": 13
     },
     "_enabled": true,
     "_materials": [
@@ -625,14 +613,14 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 18
+        "__id__": 17
       },
       {
-        "__id__": 19
+        "__id__": 18
       }
     ],
     "_prefab": {
-      "__id__": 20
+      "__id__": 19
     },
     "_opacity": 255,
     "_color": {
@@ -686,7 +674,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 17
+      "__id__": 16
     },
     "_enabled": true,
     "_materials": [
@@ -719,7 +707,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 17
+      "__id__": 16
     },
     "_enabled": true,
     "_color": {
@@ -752,10 +740,10 @@
     },
     "_enabled": true,
     "icon": {
-      "__id__": 15
+      "__id__": 14
     },
     "labName": {
-      "__id__": 18
+      "__id__": 17
     },
     "_id": ""
   },
@@ -778,6 +766,7 @@
       "__id__": 2
     },
     "bClickClose": true,
+    "onComplete": [],
     "_id": ""
   },
   {

+ 10 - 2
assets/script/before/GamePlay.ts

@@ -7,7 +7,7 @@ import BonusTip from "./view/effect/BonusTip";
 import DataMgr from "./mgr/DataMgr";
 import EffectMgr, { TIP_SPRITEITEM_TYPE } from "./mgr/EffectMgr";
 import GameMgr, { UI_NAME } from "./mgr/GameMgr";
-import { AUDIO_TYPE, EVENT_TYPE, GameProp } from "../game/data/GameData";
+import { AUDIO_TYPE, DataEventId, EVENT_TYPE, GameProp, VideoAdType } from "../game/data/GameData";
 import JsbSystem from "../mk/system/JsbSystem";
 
 const { ccclass, property } = cc._decorator;
@@ -184,6 +184,7 @@ export default class GamePlay extends cc.Component {
     }
 
     public start() {
+        mk.data.sendDataEvent(DataEventId.level, "关卡开启");
         PoolMgr.Inst.initPoolPrefab();
         GameConst.loadConfig().then(() => {
             this.adapt();
@@ -542,6 +543,11 @@ export default class GamePlay extends cc.Component {
         DataMgr.Inst.updatePropNum(2, GamePlay.Inst.curPropType, -1);
     }
 
+    /** 点击关卡气泡红包 */
+    onClickLevelQiPaoPacket() {
+        mk.ad.videoAdType = VideoAdType.LevelQiPaoRedBag;
+    }
+
     /**更改cellItem类型
      * @param cellItemType
      */
@@ -957,6 +963,7 @@ export default class GamePlay extends cc.Component {
 
     /**刷新关卡 */
     refreshGame() {
+        mk.data.sendDataEvent(DataEventId.level, "关卡开启");
         this.recycleAllCellItem();
         this.ifPass = false;
         this.ifGetPass = false;
@@ -999,9 +1006,10 @@ export default class GamePlay extends cc.Component {
         if (GamePlay.Inst.node.active == false || this.ifPass) {
             return;
         }
+        
+        mk.data.sendDataEvent(DataEventId.level, "关卡通关");
 
         this.ifPass = true;
-
         GamePlay.Inst.ifGetPass = false;
 
         let levelNum = gData.gameData.getProp(GameProp.levelNum);

+ 3 - 3
assets/script/before/util/GameLogic.ts

@@ -101,7 +101,7 @@ export default class GameLogic extends cc.Component {
     public static checkAboveCellItem(index_x: number, index_y: number, type: number, ifTagRemoved: boolean): cc.Vec2 {
 
         if (!GamePlay.Inst || !GamePlay.Inst.cellItemDic) {
-            return;
+            return null;
         }
 
         if (index_y <= 0) {
@@ -130,7 +130,7 @@ export default class GameLogic extends cc.Component {
     public static checkBelowCellItem(index_x: number, index_y: number, type: number, ifTagRemoved: boolean): cc.Vec2 {
 
         if (!GamePlay.Inst || !GamePlay.Inst.cellItemDic) {
-            return;
+            return null;
         }
 
         if (index_y >= (GameConst.row_num - 1)) {
@@ -157,7 +157,7 @@ export default class GameLogic extends cc.Component {
     public static checkLeftCellItem(index_x: number, index_y: number, type: number, ifTagRemoved: boolean): cc.Vec2 {
 
         if (!GamePlay.Inst || !GamePlay.Inst.cellItemDic) {
-            return;
+            return null;
         }
 
         if (index_x <= 0) {

+ 3 - 2
assets/script/before/view/uiItem/CellItem.ts

@@ -1,12 +1,12 @@
 import GamePlay from "../../GamePlay";
-import { PROPTYPE, SURPRISETASKTYPE } from "../../data/Enum";
+import { PROPTYPE, SURPRISETASKTYPE, VIDEOTYPE } from "../../data/Enum";
 import GameLogic from "../../util/GameLogic";
 import PoolMgr, { NODEPOOLPREFABTYPE } from "../../mgr/PoolMgr";
 import GameConst from "../../data/GameConst";
 import AniFinishDestroy from "../../util/common/AniFinishDestroy";
 import EliminateScore from "../effect/EliminateScore";
 import ScoreEnergy from "../effect/ScoreEnergy";
-import { GameProp } from "../../../game/data/GameData";
+import { GameProp, VideoAdType } from "../../../game/data/GameData";
 
 const { ccclass, property } = cc._decorator;
 
@@ -361,6 +361,7 @@ export default class CellItem extends cc.Component {
                     this.scheduleOnce(() => {
                         if (GamePlay.Inst.finalGetScore < GamePlay.Inst.targetScore) {
                             gData.reward.subType = 2;
+                            mk.ad.videoAdType = VideoAdType.LevelScoreRedBag;
                             mk.ui.openPanel("module/reward/rewardLuck");
                         }
                     });

+ 39 - 1
assets/script/game/data/GameData.ts

@@ -469,7 +469,45 @@ export enum EVENT_TYPE {
     UPDATE_CashNum = "UPDATE_CashNum",
 }
 
-export enum StorageKey {
+
+/** 数据事件Id */
+export enum DataEventId {
+    /** 点击 */
+    guide = "guide",
+    /** 按钮点击 */
+    button_click = "button_click",
+    /** 看视频 */
+    video_init = "video_init",
+    /** 看视频完成 */
+    video_end = "video_end",
+    /** 福袋功能 */
+    fudaiFunction = "fudaiFunction",
+    /** 互推功能 */
+    hutuiFunction = "hutuiFunction",
+    /** 关卡 */
+    level = "level",
+    /** 常规提现-红包币提现 */
+    commonWithDrawal = "commonWithDrawl",
+    /** 存钱罐提现 */
+    jarWithDrawal = "jarWithDrawal",
+    /** 签到提现 */
+    signWithDrawal = "signWithDrawal",
+}
 
 
+/** 视频广告类型 */
+export enum VideoAdType {
+    Null = "",
+    /** 关卡积分红包 */
+    LevelScoreRedBag = "关卡积分红包",
+    /** 主界面气泡红包 */
+    StartQiPaoRedBag = "主界面气泡红包",
+    /** 关卡气泡红包 */
+    LevelQiPaoRedBag = "关卡气泡红包",
+    /** 转盘 */
+    Turntable = "转盘视频",
+    /** 福袋视频" */
+    Fudai = "福袋视频",
+    /** 签到视频 */
+    Sign = "签到视频"
 }

+ 3 - 0
assets/script/game/data/module/CashProData.ts

@@ -4,6 +4,7 @@
  */
 
 import { Data } from "../../../mk/data/Data";
+import { DataEventId } from "../GameData";
 
 export default class CashProData extends Data {
     init_data = false;
@@ -30,6 +31,7 @@ export default class CashProData extends Data {
 
                 if (response && response.data.code == 1) {
                     gData.cashPro.init_success = true;
+                    mk.data.sendDataEvent(DataEventId.fudaiFunction,`视频红包大额提现第${gData.blessingBag.taskRbId}档领取成功`)
                 }
                 else {
                     gData.cashPro.init_fail = true;
@@ -40,6 +42,7 @@ export default class CashProData extends Data {
 
                 if (response && response.data.code == 1) {
                     gData.cashPro.init_success = true;
+                    mk.data.sendDataEvent(DataEventId.fudaiFunction,`视频红包第${gData.blessingBag.taskRbId}档领取成功`)
                 }
                 else {
                     gData.cashPro.init_fail = true;

+ 52 - 4
assets/script/game/game/Game.ts

@@ -1,5 +1,5 @@
 import JsbSystem from "../../mk/system/JsbSystem";
-import { GameProp } from "../data/GameData";
+import { DataEventId, GameProp, VideoAdType } from "../data/GameData";
 import FunBtns from "./FunBtns";
 
 const { ccclass, property } = cc._decorator;
@@ -176,8 +176,8 @@ export default class Game extends cc.Component {
 
         gData.gameData.init_red_point = false;
 
-        if(this.nodeRedPoint.node_redbagCash.active){
-            mk.guide.open(2); 
+        if (this.nodeRedPoint.node_redbagCash.active) {
+            mk.guide.open(2);
         }
     }
 
@@ -204,13 +204,61 @@ export default class Game extends cc.Component {
         // mk.fly.PlayCoinAnim(2, 20, cc.v2(0, -300), 'Canvas/界面层/game/功能按钮/右侧按钮/btn2');
     }
 
-    /** */
+    /** 点击开始 */
     public onClickStart(a, b) {
+        mk.data.sendDataEvent(DataEventId.button_click, "开始游戏icon");
         this.node_gameplay.active = true;
     }
 
+    /** 点击互推 */
+    public onClickHuTui() {
+        mk.data.sendDataEvent(DataEventId.button_click, "互推icon");
+    }
+
+    /** 点击福利礼包 */
+    public onClickFuli() {
+        mk.data.sendDataEvent(DataEventId.button_click, "福利礼包icon");
+    }
+
+    /** 点击气泡红包 */
+    public onClickQipaoRedBag() {
+        mk.ad.videoAdType = VideoAdType.StartQiPaoRedBag;
+        mk.data.sendDataEvent(DataEventId.button_click, "气泡红包icon");
+    }
+
+    /** 点击红包提现 */
+    public onClickRedBagCash() {
+        mk.data.sendDataEvent(DataEventId.button_click, "常规提现-提现icon");
+    }
+
+    /**点击金猪提现 */
+    public onClickGoldPigCash() {
+        mk.data.sendDataEvent(DataEventId.button_click, "金猪现金-提现icon");
+    }
+
+    /** 点击金猪存钱罐 */
+    public onClickPigBank() {
+        mk.data.sendDataEvent(DataEventId.button_click, "存钱罐icon");
+    }
+
+    /**  */
+    public onClickTurntable() {
+        mk.data.sendDataEvent(DataEventId.button_click, "转盘icon");
+    }
+
+    /** 点击签到 */
+    public onClickSign() {
+        mk.data.sendDataEvent(DataEventId.button_click, "签到icon");
+    }
+
+    /** 点击福袋 */
+    public onClickFudai() {
+        mk.data.sendDataEvent(DataEventId.button_click, "福袋icon");
+    }
+
     /**点击分享 */
     public onClickShare() {
+        mk.data.sendDataEvent(DataEventId.button_click, "互推icon");
         if (!gData.loginData.isAuth) {
             // mk.tip.pop("请先点击头像,在设置界面授权");
             JsbSystem.WxAuth();

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

@@ -5,6 +5,7 @@
 
 import JsbSystem from "../../../mk/system/JsbSystem";
 import { AdFun } from "../../data/AdData";
+import { DataEventId, VideoAdType } from "../../data/GameData";
 import { cashProType } from "../../data/module/CashProData";
 
 
@@ -229,6 +230,7 @@ export default class BlessingBag extends cc.Component {
 
 
     Click_AdProgressBtn() {
+      
         mk.audio.playEffect("button");
         if (!gData.loginData.isAuth) {
             JsbSystem.WxAuth();
@@ -239,6 +241,7 @@ export default class BlessingBag extends cc.Component {
             gData.blessingBag.HttpNoAdProgress();
         } else {
             if (gData.blessingBag.videoRbData.videoTime > 0) {
+                mk.ad.videoAdType = VideoAdType.Fudai;
                 mk.ad.watchAd((success: boolean) => {
                     mk.console.log("watchAD:" + success);
                     if (success) {
@@ -307,7 +310,9 @@ export default class BlessingBag extends cc.Component {
         mk.audio.playEffect("button");
         if (!this.canOpen) return;
         this.canOpen = false;
+
         if (this.rbPanelType == 1) {
+           
             gData.cashPro.openCashPro(cashProType.blessing_bigCash, gData.blessingBag.bigRbNum)
         } else {
             //弹确认提现界面

+ 11 - 2
assets/script/game/module/guide/Guide.ts

@@ -1,3 +1,4 @@
+import { DataEventId } from "../../data/GameData";
 import GuideVO from "./GuideVO";
 
 /**
@@ -54,6 +55,7 @@ export default class Guide extends cc.Component {
     private nextStep() {
         this.crtStep++;
         this.crtGuide = this.guides[this.crtStep];
+        mk.data.sendDataEvent(DataEventId.guide,`新手引导第${gData.guideData.crtID}_${this.crtStep}步完成`);
         this.updateGuide();
     }
 
@@ -107,6 +109,15 @@ export default class Guide extends cc.Component {
                 x = pos.x;
                 y = pos.y;
 
+                //lastStruggle
+                if (this.crtGuide && this.crtGuide.id == 2 && this.crtStep == 1) {
+                    w = this.targetNode.parent.width;
+                    h = this.targetNode.parent.height;
+                    let pos1 = mk.game.getWorldPos(this.targetNode.parent);
+                    x = pos1.x;
+                    y = pos1.y - h / 2;                    
+                }
+
                 //穿透点击目标节点时增加一个事件触发下一步,触发后移除
                 this.node_click.width = this.node_click.height = 0;
                 let eventHandler = new cc.Component.EventHandler();
@@ -231,8 +242,6 @@ export default class Guide extends cc.Component {
         this.node.destroy();
     }
 
-
-
     ///////////////// 自定义触摸监听 /////////////////
     private _eventManager = cc["internal"]["eventManager"];
     private _touchListener: any;

+ 2 - 1
assets/script/game/module/moreGame/MoreGameNormalItem.ts

@@ -3,6 +3,7 @@
  * @author kaka
  */
 import JsbSystem from "../../../mk/system/JsbSystem";
+import { DataEventId } from "../../data/GameData";
 
 
 const { ccclass, property } = cc._decorator;
@@ -102,7 +103,7 @@ export default class MoreGameNormalItem extends cc.Component {
         if (this.cool) {
             return
         }
-
+        mk.data.sendDataEvent(DataEventId.hutuiFunction,"互推格子位下载");
         this.cool = true
         this.scheduleOnce(() => {
             this.cool = false

+ 2 - 1
assets/script/game/module/moreGame/MoreGamePicItem.ts

@@ -3,6 +3,7 @@
  * @author kaka
  */
 import JsbSystem from "../../../mk/system/JsbSystem";
+import { DataEventId } from "../../data/GameData";
 
 const { ccclass, property } = cc._decorator;
 
@@ -77,7 +78,7 @@ export default class MoreGamePicItem extends cc.Component {
         if (this.cool) {
             return
         }
-
+        mk.data.sendDataEvent(DataEventId.hutuiFunction,"互推推荐位banner下载");
         this.cool = true
         this.scheduleOnce(() => {
             this.cool = false

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

@@ -4,6 +4,7 @@
  */
 
 import JsbSystem from "../../../mk/system/JsbSystem";
+import { DataEventId } from "../../data/GameData";
 
 
 const { ccclass, property } = cc._decorator;
@@ -66,7 +67,7 @@ export default class MoreGamePopNode extends cc.Component {
         }
 
         this.cool = true
-
+        mk.data.sendDataEvent(DataEventId.hutuiFunction,"互推插屏下载");
         if (this.data.appType == 1) {
             if (!JsbSystem.ifCanStartGame(this.data.packageName, true)) {
                 gData.moreGame.createNewTask(this.data)

+ 2 - 1
assets/script/game/module/pigBank/PigBank.ts

@@ -1,5 +1,5 @@
 import JsbSystem from "../../../mk/system/JsbSystem";
-import { GameProp } from "../../data/GameData";
+import { DataEventId, GameProp } from "../../data/GameData";
 
 const { ccclass, property } = cc._decorator;
 /**
@@ -94,6 +94,7 @@ export default class PigBank extends cc.Component {
             JsbSystem.WxAuth();
             return;
         }
+        mk.data.sendDataEvent(DataEventId.jarWithDrawal,"存钱罐提现成功");
         gData.pigbank.cashOP();
         mk.ui.closePanel(this.node.name);
     }

+ 2 - 1
assets/script/game/module/redBagCash/RedBagCashItem.ts

@@ -1,4 +1,4 @@
-import { RewardState } from "../../data/GameData";
+import { DataEventId, RewardState } from "../../data/GameData";
 import { CDataType } from "../../data/module/RedBagCashData";
 
 const { ccclass, property } = cc._decorator;
@@ -85,6 +85,7 @@ export default class RedBagCashItem extends cc.Component {
             mk.tip.pop('请按顺序提现');
             return;
         }
+        mk.data.sendDataEvent(DataEventId.commonWithDrawal,"常规提现-红包币提现成功");
         gData.redBagCash.cashOP();
     }
 

+ 6 - 1
assets/script/game/module/sign/Sign.ts

@@ -1,7 +1,7 @@
 import JsbSystem from "../../../mk/system/JsbSystem";
 import TableView from "../../component/TableView";
 import { AdFun } from "../../data/AdData";
-import { RewardType } from "../../data/GameData";
+import { DataEventId, RewardType, VideoAdType } from "../../data/GameData";
 
 /**
  * 签到界面
@@ -77,11 +77,16 @@ export default class Sign extends cc.Component {
                 return;
             }
         }
+        mk.ad.videoAdType = VideoAdType.Sign;
         // 看广告
         mk.ad.watchAd((success: boolean) => {
             mk.console.log("watchAD:" + success);
             if (success) {
                 gData.adData.watchVideo(AdFun.sign);
+                //FC:埋点
+                if (gData.sign.c_sign[index_old].rewardType === RewardType.rmb) {
+                    mk.data.sendDataEvent(DataEventId.signWithDrawal, "签到提现成功");
+                }
                 mk.ad.destroyNativeAd();
             }
         });

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

@@ -1,5 +1,6 @@
 import BtnClosePanel from "../../component/BtnClosePanel";
 import { AdFun } from "../../data/AdData";
+import { VideoAdType } from "../../data/GameData";
 import TurnableItem from "./TurnableItem";
 
 const { ccclass, property } = cc._decorator;
@@ -62,6 +63,7 @@ export default class Turnable extends cc.Component {
     /** 点击抽奖 */
     clickDraw() {
         if (gData.turnable.leftTimes > 0) {
+            mk.ad.videoAdType = VideoAdType.Turntable;
             mk.ad.watchAd((success: boolean) => {
                 mk.console.log("watchAD:" + success);
                 if (success) {

+ 3 - 1
assets/script/mk/sdk/ad/toppon/AnyThinkAdsMgr/ATRewardVideo.ts

@@ -1,3 +1,4 @@
+import { DataEventId, VideoAdType } from "../../../../../game/data/GameData";
 import { zgSingleton } from "../../zgSingleton";
 import ATSDKMgr, { AdPlayStateType } from "./ATSDKMgr";
 
@@ -108,7 +109,7 @@ export class ATRewardVideo extends zgSingleton {
         //     data.network_firm_id, data.adsource_id, data.adsource_index, data.adsource_price,
         //     data.adsource_isheaderbidding, data.publisher_revenue, data.precision, data.ecpm_level);
         gData.adData.updateData(placementId, data);
-
+        mk.data.sendDataEvent(DataEventId.video_init, mk.ad.videoAdType);
         this.reawardAdState = RewardAdState.Unload;
         //点击关闭的时候重新加载(亲测,即使在start这边 加载 也是在点击关闭时候才返回成功)
         //this.loadAd();
@@ -161,6 +162,7 @@ export class ATRewardVideo extends zgSingleton {
             //     data.adsource_isheaderbidding, data.publisher_revenue, data.precision, data.ecpm_level);
 
             ATSDKMgr.getInstance().watchVideoAdCallBack(AdPlayStateType.WatchEnd);
+            mk.data.sendDataEvent(DataEventId.video_end, mk.ad.videoAdType);
         }
         else {
             ATSDKMgr.getInstance().watchVideoAdCallBack(AdPlayStateType.Cancel);

+ 3 - 1
assets/script/mk/system/AdSystem.ts

@@ -1,3 +1,4 @@
+import { VideoAdType } from "../../game/data/GameData";
 import { IADSDKMgr } from "../sdk/ad/IADSDKMgr";
 import JsbSystem from "./JsbSystem";
 
@@ -21,7 +22,8 @@ export default class AdSystem {
 
     /** 是否显示广告 */
     public ifShowAd: boolean = true;
-
+    /** 视频广告类型 */
+    public videoAdType:VideoAdType = VideoAdType.Null;
     /** 视频广告回调 */
     public videoAdcallBack: Function = null;
 

+ 13 - 2
assets/script/mk/system/DataSystem.ts

@@ -1,11 +1,22 @@
+import JsbSystem from "./JsbSystem";
+
 /**
  * @description 数据管理类
  * @author 邹勇
  */
 export default class DataSystem {
     constructor() {
-        
+
     }
 
-    
+    /**
+     * 发生数据事件
+     * @param eventId 事件Id
+     * @param des     事件内容
+     */
+    public sendDataEvent(eventId: string, des: string) {
+        if (eventId && des) {
+            JsbSystem.sendEvent(eventId, des);
+        }
+    }
 }

+ 2 - 1
assets/script/mk/system/GuideSystem.ts

@@ -1,4 +1,4 @@
-import { GameProp } from "../../game/data/GameData";
+import { DataEventId, GameProp } from "../../game/data/GameData";
 import { OpenActionType } from "./UISystem";
 
 
@@ -37,6 +37,7 @@ export default class GuideSystem {
         if (guide == null) {
             id = 9999;
         }
+       
         gData.gameData.setProp(GameProp.guideID, id);
     }
 

+ 3 - 4
build/jsb-link/frameworks/runtime-src/proj.android-studio/app/src/org/cocos2dx/javascript/thirdSdk/ThirdSdkMgr.java

@@ -6,6 +6,7 @@ import android.content.Context;
 import android.util.Log;
 
 import org.cocos2dx.javascript.AppActivity;
+import org.cocos2dx.javascript.thirdSdk.thinkingdata.TDSDKMgr;
 import org.cocos2dx.javascript.util.DeviceUtil;
 import org.cocos2dx.lib.Cocos2dxJavascriptJavaBridge;
 
@@ -108,15 +109,13 @@ public class ThirdSdkMgr {
     //埋点相关---------------------------------------------------------------------------------------
     /**
      * 埋点
-     * @param BeventID
      * @param eventID
      * @param des
      */
-    public static void sendEvent(String BeventID, String eventID, String des){
-
+    public static void sendEvent(String eventID, String des){
+        TDSDKMgr.getInstance().setTAEvent(eventID,des);
     }
 
-
     //系统相关---------------------------------------------------------------------------------------
     /**
      * 复制到剪贴板

Некоторые файлы не были показаны из-за большого количества измененных файлов