节点重复利用问题,点击事件的问题

node被移除后果断时间再添加到场景中,后node上面脚本注册的点击事件也无响应,重新注册点击事件也是没有响应的

this.game_1 = this.node.getChildByName(“game_1”)
var pos = this.game_1.position
this.game_1.on(cc.Node.EventType.TOUCH_START, function () {
console.log(“click—”)
}, this)
this.game_1.targetOff()
this.game_1.removeFromParent()
this.node.addChild(this.game_1)
this.game_1.position = pos
this.game_1.on(cc.Node.EventType.TOUCH_START, function () {
console.log(“click—”)
}, this)

这个直接不行 怎么样才行尼

Exception: TypeError: ‘caller’, ‘callee’, and ‘arguments’ properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction (:2:14)

顶顶顶顶

打印game_1的信息

还有cc.NodePool也是各种问题,无语了,我现在都用我自己写的对象池了

你把它put回节点池的时候 先把他的点击事件给关闭了试试 因为很多对象池的原因都是没有初始化导致的