var TwoGameScene = cc.Scene.extend({
cardArray:null,
onEnter: function(){
var touchListener = cc.EventListener.create({
event: cc.EventListener.TOUCH_ONE_BY_ONE,
swallowTouches: true,
onTouchEnded: function(touch,event){
this.moveLeft();
}
},
},
moveLeft: function(){
console.log("done");
return true;
}
})
代码如上,问题是为何this.moveLeft();调用不到,会有异常
TypeError: undefined is not a function (evaluating ‘this.moveLeft()’)