cc.Class({
extends: cc.Component,
properties: {
},
changePlace_me:function(){
// do someting
},
onLoad: function () {
this.node.on('touchend', function ( event ) {
this.changePlace_me();})
})
代码入上。在his.node.on(‘touchend’, function ( event ) 中,this已经变了,所以调用this.changePlace_me就会报错,请问正确的方式是什么呢?