"use strict"; cc._RF.push(module, '2d60auOHiJBQJu3CelKjfOV', 'PauseNode'); // Texture/prefab/PauseNode.js "use strict"; var ZYGameTool = require('GameTool'); var GamePause = cc.Class({ "extends": cc.Component, properties: { btn: { title: "按钮", type: cc.Node, "default": [] }, btnCallFunc: null }, // LIFE-CYCLE CALLBACKS: onLoad: function onLoad() { this.node.on(cc.Node.EventType.TOUCH_START, this.touchBegin.bind(this), this); if (!Module.GamePauseLayer) Module.GamePauseLayer = this; for (var i in this.btn) { this.btn[i].on('click', function (event) { this.node.destroy(); Module.GamePauseLayer = null; console.log("------click", event.node.name); if (this.btnCallFunc) this.btnCallFunc(event.node.name); }.bind(this)); } ZYGameTool.getInstance().OpenAd("banner", "banner"); }, start: function start() {}, call: function call(func) { this.btnCallFunc = func; }, touchBegin: function touchBegin(touch, event) { this.node.destroy(); } // update (dt) {}, }); cc._RF.pop();