event: cc.EventListener.TOUCH_ONE_BY_ONE,
onTouchBegan:function(touches,event){
//获得玩家输入点击的是左边还是右边
var target = event.getCurrentTarget();
var locationInNode=target.convertToNodeSpace(touches.getLocation());//获得点击的坐标
cc.log(“点击的坐标”);
cc.log(locationInNode.x);
cc.log(“屏幕的宽度”);
cc.log(self.node.width);
在web上、小程序上,点击屏幕,获取的坐标为0-640
而在安卓上获取的坐标为-320-320