12345678910111213141516171819202122232425262728293031323334 |
- // Learn cc.Class:
- // - https://docs.cocos.com/creator/manual/en/scripting/class.html
- // Learn Attribute:
- // - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
- // Learn life-cycle callbacks:
- // - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
- cc.Class({
- extends: cc.Component,
- properties: {
- },
- // LIFE-CYCLE CALLBACKS:
- //定义PK比赛的奖金,赢了就是当前购买单价的10倍的奖金,输了就奖励当前产量的钱
- onLoad() {
- this.node.on('click',this.backgame,this);
- },
- backgame() {
- MyAudio.PlayEffect_button();
- MyAudio.StopEffect_pkbgm();
- cc.director.loadScene("Main")
- Global.bannerAd.hide();
- Global.EndRecode();
- let interstitialAd = Global.interstitialAd;
- if (interstitialAd) {
- interstitialAd.hide().catch((err) => {
- console.error(err)
- })
- }
- }
- // update (dt) {},
- });
|