var fromChild = this.vs.getChildByName("fromSeat");
var toChild = this.vs.getChildByName("toSeat");
this.vs.active = true;
fromChild.x = -640;
toChild.x = 640;
//动画--不执行,郁闷了
fromChild.runAction(cc.moveTo(2, cc.p(-165, 167)));
toChild.runAction(cc.moveTo(2, cc.p(165, 167)));
目测你是不是用了Widget组件呢?
1赞
对,确实用到了,多谢指点,删除后已经可以了!!!
如果你想始终靠边固定像素距离,下面有个alignOnce属性默认勾选了,你可以选择不勾选试试