这是添加in 和out 一起使用的效果



const InPosList= [ cc.v2(0,96), cc.v2(0,-96), cc.v2(-96,0), cc.v2(96,0) ];
initLine(direction,value){
//根据方向和值,确实显示效果。
if(value==defines.PuzzleLineValue.IN){
return;
}
if(value==defines.PuzzleLineValue.OUT){
let node = cc.instantiate(this.puzzleHead);
node.parent = this.node;
node.position = OutPosList[direction-1];
node.rotation = OutAngleList[direction-1];
}
let inOut = cc.instantiate(this.puzzleHead);
inOut.parent = this.node;
inOut.position= InPosList[direction-1];
inOut.rotation = OutAngleList[direction-1]+180;
},
站长微信:xiaomao0055
站长QQ:14496453