//var huapin = childs[3].getChildByName('k').children[0]
// var pos1 = huapin.convertToWorldSpaceAR(cc.p(0,0));
// var pos2 = this.node.convertToNodeSpaceAR(pos1);
// huapin.setPosition(pos2)
// huapin.parent = this.node
function changeParent(node, parent){
var pos1 = node.convertToWorldSpaceAR(cc.p(0,0));
var pos2 = parent.convertToNodeSpaceAR(pos1);
node.setPosition(pos2)
node.parent = parent
}
网友评论