Browse Source

上报信息添加

woso_javan 3 months ago
parent
commit
0c52b2333d

+ 3 - 0
assets/module_movecar/Prefabs/UI/Result/UI_BattleResult_Impl.ts

@@ -45,6 +45,9 @@ export class UI_BattleResult_Impl extends UI_BattleResult {
         }
 
         this.rotationLight();
+
+        const { level } = LevelManager.instance.levelModel;
+        GtagMgr.inst.doGameDot(GtagType.level_end, { level }); //上报关卡结束
     }
 
     //下雨效果播放

+ 14 - 0
assets/module_movecar/Script/LevelAction.ts

@@ -12,6 +12,9 @@ import { LevelManager } from './Manager/LevelMgr';
 import { CarBoxComponent } from './Components/CarBoxComponent';
 import { CarColorLog, CarColors, CarTypes } from './CarColorsGlobalTypes';
 import { GameUtil } from './GameUtil';
+import { GtagMgr, GtagType } from '../../core_tgx/base/GtagMgr';
+import { GlobalConfig } from '../../start/Config/GlobalConfig';
+import { AdvertMgr } from '../../core_tgx/base/ad/AdvertMgr';
 const { ccclass, property } = _decorator;
 
 enum ParkingStatus {
@@ -27,6 +30,17 @@ export class LevelAction extends Component {
         this.registerListener();
         this.init_level();
         this.schedule(this.moveToCar, 1.2);
+        this.reportInformation();
+    }
+
+    //上报信息
+    reportInformation() {
+        const { level } = LevelManager.instance.levelModel;
+        GtagMgr.inst.doGameDot(GtagType.level_start, { level });
+
+        if (!GlobalConfig.isDebug) {
+            AdvertMgr.instance.showInterstitial();
+        }
     }
 
     registerListener() {