我的代码如下, polygon是包围框还是点集
var touchLoc = touch.getLocation();
var ub = this.u.getBoundingBox()
if (cc.Intersection.pointInPolygon(touchLoc, ub)) {
this.up = true
cc.log(‘touchbigan2’)
}
cc.log('touchbigan1')
return true;
},
}, this.node);