var UITouch = cc.Class({ extends: cc.Component, // name: "UITouch", properties: { //是否关闭Touch isTouchClose: false, }, // LIFE-CYCLE CALLBACKS: // onLoad () {}, start() { }, TouchStartFunction() { // cc.log('点击UI屏幕'); if (this.isTouchClose) return; this.node.active = false; }, //设置当前打开的目标 //并且显示 onChangeMaskActive(isActive) { this.node.active = isActive; }, // onEnable() { // this.node.on(cc.Node.EventType.TOUCH_START, this.TouchStartFunction, this); // }, // onDisable() { // this.node.off(cc.Node.EventType.TOUCH_START, this.TouchStartFunction, this); // } });