Browse Source

修改升级

tang biao 5 years ago
parent
commit
770d9e27c5
2 changed files with 32 additions and 2 deletions
  1. 31 1
      assets/scripts/game/Game.js
  2. 1 1
      assets/scripts/skill/SkillItem.js

+ 31 - 1
assets/scripts/game/Game.js

@@ -63,7 +63,7 @@ cc.Class({
         /// 初始化广告W6Lcux7ArPGCBpnWuAyEVK48PrrYX7xWBA
 
         if (window.tt != undefined) {
-
+            GameGlobal._adVideoState = 1;
         } else if (CC_WECHATGAME) {
             GameGlobal._adVideo = new ADVideo();
             GameGlobal._adVideo.wxCreateADVideo();
@@ -438,5 +438,35 @@ cc.Class({
             this.additionTipsNode.show(text, type);
         }
     },
+
+    //处理头条录制视频然后分享的功能
+    handleTTRecordVideo: _.debounce((event) => {
+        const recorder = tt.getGameRecorderManager();
+
+        recorder.start({
+        microphoneEnabled: true,
+        })
+
+        recorder.onStart(res =>{
+        // 录屏开始
+        console.log(res.microphoneStatus);
+        // do somethine;
+        })
+
+        recorder.onStop(res =>{
+        // 录屏结束;
+        console.log(res.videoPath);
+        })
+
+        recorder.onPause(() =>{
+        // 录屏已暂停;
+        })
+
+        recorder.onResume(() =>{
+        // 录屏已恢复;
+        })
+
+
+    }, 1000, true),
     // update (dt) {},
 });

+ 1 - 1
assets/scripts/skill/SkillItem.js

@@ -538,7 +538,7 @@ cc.Class({
             GameEvent.fire(GameNotificationKey.UpBuildingLevel);
             GameEvent.fire(GameNotificationKey.GameShowAdditionTips,"总部大楼",0);
             this.updateBuildingData();
-            let objct = {'cdTime': -6 * 1000, 'desc': '点击提升2倍的金币产出', 'icon': 900001};
+            let objct = {'cdTime': -6 * 1000, 'infoDesc': '点击提升2倍的金币产出', 'icon': 900001};
             GameGlobal._fixInformations.push(objct);
             GameEvent.fire(GameNotificationKey.GameUpdateMessageList, 1, false);
             console.log("领取里程碑奖励成功");