测试代码很简单:
this.canvas.on(cc.Node.EventType.TOUCH_MOVE, this.onTouchMoveCallback, this, true)
onTouchMoveCallback(event:cc.Event.EventTouch) {
let touches = event.getTouches();
if (touches.length >= 2) {
console.error(“双指操作”)
}else{
console.error(“单指操作”)
}
}
结果是两指手指操作的时候,单指操作log也有非常多。


!