var a = new cc.Rect(0, 0, 10, 10);
var b = new cc.Vec2(0, 5);
a.contains(b);// true
// 全局坐标转换为局部坐标
let npos = this.anode.convertToNodeSpaceAR(gpos);
// 局部坐标转换为全局坐标,前面要为anode的父节点
let gpos = this.aParentNode.convertToWorldSpaceAR(this.anode.position);

标签: none

添加新评论