Duowan преди 6 години
родител
ревизия
8eb4fb5d20
променени са 1 файла, в които са добавени 4 реда и са изтрити 23 реда
  1. 4 23
      assets/Script/Game/GameSence.js

+ 4 - 23
assets/Script/Game/GameSence.js

@@ -87,7 +87,7 @@ cc.Class({
             this.node.getChildByName("FuncNode").setPosition(0, -(cc.winSize.height - 1334) / 2);
         }
 
-        this.showVd = false;
+        this.showVd = true;
         this.debugErrorTips = false;
 
         this.shieldBtn = this.funcNode.getChildByName('ShieldBtn');
@@ -109,13 +109,6 @@ cc.Class({
     },
 
     startGame: function () {
-        //通知子域重新填充rankList
-        if (UserInfo.platform == 1 && cc.vv.isRank) {
-            wx.postMessage({
-                method: 'fillRankList'
-            });
-        }
-
         cc.audioEngine.playMusic(this.gamebgMusic, true);
 
         this.sumScore = 0;
@@ -124,7 +117,7 @@ cc.Class({
         this.obstacleNum = 0;
         this.bShare = true;
         this.bDead = false;
-        this.bVideo = true;
+        
         this.scoreNode.active = true;
         this.funcNode.active = true;
         this.shieldBtn.active = true;
@@ -146,18 +139,6 @@ cc.Class({
 
         this.createObstacle();
         this.node.runAction(cc.sequence(cc.delayTime(1), cc.callFunc(this.createObstacle, this), cc.delayTime(1), cc.callFunc(this.createObstacle, this)));
-
-        let stmp = new Date().getTime();
-        cc.loader.load({
-            url: "https://pub.dwstatic.com/wxgame/budingGame/share.json?" + (stmp / 100000).toFixed(0),
-            type: "json"
-        }, (err, res) => {
-            if (res) {
-                this.showVd = res.showVd
-                this.bShare = res.bShare
-                this.debugErrorTips = res.debugErrorTips
-            }
-        })
     },
 
     finishGame: function () {
@@ -279,7 +260,6 @@ cc.Class({
         this.obstacleNum = 0;
         this.scoreNode.active = true;
         this.funcNode.active = true;
-
         this.node.getChildByName("GameOver").active = false;
         this.obstacleNode.removeAllChildren();
 
@@ -757,6 +737,7 @@ cc.Class({
             var isFinish = false;
             this.bShare = false;
             countDownLabel.stopAllActions();
+            cc.audioEngine.stopMusic(this.gamebgMusic);
             var videoAd = BK.Advertisement.createVideoAd();
 
             //加载成功
@@ -900,7 +881,7 @@ cc.Class({
                 startMs: GameStatusInfo.startMs,
                 endMs: ((new Date()).getTime()).toString(),
                 scoreInfo: {
-                    score: parseInt(UserInfo.getScore()), //分数,类型必须是整型数
+                    score: parseInt(this.sumScore), //分数,类型必须是整型数
                 }
             }],
             attr: {