cocos creator 2.4.5 使用时的一些易错点
2022-07-10 本文已影响0人
吴此人
1、cc.tween(this.node).bezierTo(time,p1,p2,endp).start()。会把node弄到别的坐标,,我三个点的y轴都为负,结束时发现为正了!!应该使用 this.node.runAction(cc.bezierTo(time,[startP,centerP,endP]));这样就是正确的。 但是不管cc.bezierTo还是runAction都没有完成动画时的事件回调,目前只能采用 this.schedule(function() {
// 这里的 this 指向 component
this.doSomething();
}, time, repeat, delay)的方式在动画结束后执行回调