cc.Class({ extends: cc.Component, properties: {}, onLoad: function () { cc.PlatformTools.executeShowBanner(); cc.PlatformTools.executeShowInterstitial(); }, start: function () {}, show: function (e, o) { this.callBack1 = e; this.failBack2 = o; }, executeReceive: function () { var e = this; cc.PlatformTools.executeShowAwardVideo(function () { GlobData.ShowAsk("金币+200"); cc.playerData.coin += 200; setTimeout(function () { e.callBack1 && e.callBack1(); }, 800); cc.global.savePlayerData(); e.node.removeFromParent(true); }); }, executeCloseWindow: function () { this.failBack2 && this.failBack2(); GlobData.GameBtnClose(this.node, false); }, buttonTouchEventCallBack: function (e) { var o = e.target.name; cc.global.Source.onPlayBtnEffect("buttonClick"); switch (o) { case "btn_mfhq": this.executeReceive(); break; case "btn_guanbi": this.executeCloseWindow(); } } });