"use strict"; cc._RF.push(module, '4ff93pABuZFmKCjVTvIHITG', 'HelpNode'); // Texture/prefab/HelpNode.js "use strict"; var ZYGameTool = require('GameTool'); var gameHelp = cc.Class({ "extends": cc.Component, properties: { btn: { title: "按钮", type: cc.Node, "default": [] }, btnCallFunc: null, isClose: true }, // LIFE-CYCLE CALLBACKS: setParam: function setParam(param) { this.isClose = param; cc.log("param", param); }, onLoad: function onLoad() { this.node.on(cc.Node.EventType.TOUCH_START, this.touchBegin.bind(this), this); if (!Module.GameHelpLayer) Module.GameHelpLayer = this; for (var i in this.btn) { this.btn[i].on('click', function (event) { this.node.destroy(); Module.GameHelpLayer = 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) { if (!this.isClose) return; this.node.destroy(); } // update (dt) {}, }); cc._RF.pop();