this.moveNodes.runAction(cc.spawn(cc.moveTo(0.5, cc.p(0,0)).easing(cc.easeOut(3.0)), cc.fadeTo(0.5, 255)),
cc.callFunc(() => {
this.node.getComponent(cc.Button).interactable = true;
}))
断点回调函数发现moveNodes的坐标不是(0,0),回调会走两次?
this.moveNodes.runAction(cc.spawn(cc.moveTo(0.5, cc.p(0,0)).easing(cc.easeOut(3.0)), cc.fadeTo(0.5, 255)),
cc.callFunc(() => {
this.node.getComponent(cc.Button).interactable = true;
}))
断点回调函数发现moveNodes的坐标不是(0,0),回调会走两次?
有遇到的吗
很多,在callfunc中再赋值
…只能这样了,谢谢回复
你是不是在这次move 还没执行完毕 又执行了一次,就是你这个函数多次调用了