cc.Class({
extends: cc.Component,
properties: {
...
},
service: function(message) {
switch (message) {
case Const.Socket_JoinRes:
this.myfunction(response);
break;
default:
break;
}
},
myfunction: function(response) {
...
},
service 是jsb那边用C++的std::function 回调的
this, 调用到这里时是this.myfunction 不存在.


