使用缓动的自定义 progress :
//eg.1
cc.tween(this.node).to(2, {position: cc.v3(0, 200, 0)},
{ progress: (start, end, current, ratio) => {
return start + (end - start) *ratio;
}})
.start();
//eg.2
cc.tween(this.node).to(2, { scale: 2, angle: 90 }, {
progress: (start, end, current, ratio) => {
return start + (end - start) * ratio;
}
}).start();
例子1 节点消失
例子2 节点能正常显示