cc.eventManager.addListener({
event: cc.EventListener.TOUCH_ALL_AT_ONCE,
onTouchesMoved:function (touches, event) {
for (var i = 0; i < touches.length; i++) {
jslog("touches:", i, touches[i].getLocation().x, touches[i].getLocation().y);
}
},
onTouchBegan:function (touches, event) {
jslog("click", touches[0].getLocation().x, touches[0].getLocation().y);
}
}, this);
如果把onTouchesMovied和onTouchesEnded放到不同的类中监听,则可以实现移动和点击不互相影响。