this.node.on('position-changed', function(){
cc.log("22222222222")
}, this)
this.node.on('child-removed', function(){
cc.log("1111111111")
}, this)
移动坐标时 能触发position-changed
移除是 不能触发child-removed
this.node.on('position-changed', function(){
cc.log("22222222222")
}, this)
this.node.on('child-removed', function(){
cc.log("1111111111")
}, this)
移动坐标时 能触发position-changed
移除是 不能触发child-removed
没有child-removed这种事件,预定义好的事件请看文档:
http://cocos.com/docs/creator/scripting/internal-events.html#-cc-node-
api里面有 那么我想监听node移除时触发 怎么办