|
@@ -191,10 +191,10 @@ cc.Class({
|
|
|
}
|
|
|
this.startFinishCount();
|
|
|
} else {
|
|
|
- gemeOverNode.getChildByName("OverBg").getComponent("GameOverRank").setMyScore(parseInt(UserInfo.getScore()));
|
|
|
+ gemeOverNode.getChildByName("OverBg").getComponent("GameOverRank").setMyScore(this.sumScore);
|
|
|
gameOverNode.getChildByName("EndNode").active = true;
|
|
|
gameOverNode.getChildByName("ShareNode").active = false;
|
|
|
-
|
|
|
+
|
|
|
this.gameOver();
|
|
|
|
|
|
if (CC_QQPLAY) {
|
|
@@ -236,6 +236,8 @@ cc.Class({
|
|
|
|
|
|
gameOver: function () {
|
|
|
var gameOverNode = this.node.getChildByName("GameOver");
|
|
|
+ var overBg = gameOverNode.getChildByName("EndNode").getChildByName("OverBg").getComponent("GameOverRank");
|
|
|
+ overBg.setMyScore(this.sumScore);
|
|
|
var historyScoreLabel = gameOverNode.getChildByName("EndNode").getChildByName("HistoryScoreLabel");
|
|
|
var newRecordSp = gameOverNode.getChildByName("EndNode").getChildByName("NewRecordSp");
|
|
|
|
|
@@ -571,33 +573,33 @@ cc.Class({
|
|
|
onShieldBtn: function () {
|
|
|
if (CC_QQPLAY) {
|
|
|
this.onPassBtn();
|
|
|
-
|
|
|
+
|
|
|
var gameOverNode = this.node.getChildByName("GameOver");
|
|
|
var countDownLabel = gameOverNode.getChildByName("ShareNode").getChildByName("EndCountDownLabel");
|
|
|
var isFinish = false;
|
|
|
|
|
|
countDownLabel.stopAllActions();
|
|
|
-
|
|
|
+
|
|
|
var videoAd = BK.Advertisement.createVideoAd();
|
|
|
|
|
|
//加载成功
|
|
|
videoAd.onLoad(() => {
|
|
|
- BK.Script.log(1,1,"videoAd onLoad")
|
|
|
+ BK.Script.log(1, 1, "videoAd onLoad")
|
|
|
});
|
|
|
|
|
|
//开始播放
|
|
|
videoAd.onPlayStart(() => {
|
|
|
- BK.Script.log(1,1,"videoAd onPlayStart")
|
|
|
+ BK.Script.log(1, 1, "videoAd onPlayStart")
|
|
|
});
|
|
|
|
|
|
//播放结束
|
|
|
videoAd.onPlayFinish(() => {
|
|
|
- BK.Script.log(1,1,"videoAd onPlayFinish")
|
|
|
+ BK.Script.log(1, 1, "videoAd onPlayFinish")
|
|
|
isFinish = true;
|
|
|
});
|
|
|
|
|
|
videoAd.onClose(() => {
|
|
|
- if(isFinish) {
|
|
|
+ if (isFinish) {
|
|
|
// 看完15秒视频广告
|
|
|
// 可以下发游戏奖励
|
|
|
this.getShield();
|
|
@@ -611,7 +613,7 @@ cc.Class({
|
|
|
|
|
|
videoAd.onError(function (err) {
|
|
|
//加载失败
|
|
|
- BK.Script.log(1,1,"videoAd onError code:"+err.code+" msg:"+err.msg);
|
|
|
+ BK.Script.log(1, 1, "videoAd onError code:" + err.code + " msg:" + err.msg);
|
|
|
|
|
|
this.onPlayBtn()
|
|
|
});
|
|
@@ -759,22 +761,22 @@ cc.Class({
|
|
|
|
|
|
//加载成功
|
|
|
videoAd.onLoad(() => {
|
|
|
- BK.Script.log(1,1,"videoAd onLoad")
|
|
|
+ BK.Script.log(1, 1, "videoAd onLoad")
|
|
|
});
|
|
|
|
|
|
//开始播放
|
|
|
videoAd.onPlayStart(() => {
|
|
|
- BK.Script.log(1,1,"videoAd onPlayStart")
|
|
|
+ BK.Script.log(1, 1, "videoAd onPlayStart")
|
|
|
});
|
|
|
|
|
|
//播放结束
|
|
|
videoAd.onPlayFinish(() => {
|
|
|
- BK.Script.log(1,1,"videoAd onPlayFinish")
|
|
|
+ BK.Script.log(1, 1, "videoAd onPlayFinish")
|
|
|
isFinish = true;
|
|
|
});
|
|
|
|
|
|
videoAd.onClose(() => {
|
|
|
- if(isFinish) {
|
|
|
+ if (isFinish) {
|
|
|
// 看完15秒视频广告
|
|
|
// 可以下发游戏奖励
|
|
|
this.continueGame();
|
|
@@ -787,7 +789,7 @@ cc.Class({
|
|
|
|
|
|
videoAd.onError(function (err) {
|
|
|
//加载失败
|
|
|
- BK.Script.log(1,1,"videoAd onError code:"+err.code+" msg:"+err.msg);
|
|
|
+ BK.Script.log(1, 1, "videoAd onError code:" + err.code + " msg:" + err.msg);
|
|
|
});
|
|
|
|
|
|
videoAd.show();
|