api链接:类型别名: TweenEasing
类型:string
public TweenEasing : "linear" | "smooth" | "fade" | "constant" | "quadIn" | "quadOut" | "quadInOut" |
"quadOutIn" | "cubicIn" | "cubicOut" | "cubicInOut" | "cubicOutIn" | "quartIn" | "quartOut" | "quartInOut" |
"quartOutIn" | "quintIn" | "quintOut" | "quintInOut" | "quintOutIn" | "sineIn" | "sineOut" | "sineInOut" |
"sineOutIn" | "expoIn" | "expoOut" | "expoInOut" | "expoOutIn" | "circIn" | "circOut" | "circInOut" |
"circOutIn" | "elasticIn" | "elasticOut" | "elasticInOut" | "elasticOutIn" | "backIn" | "backOut" |"backInOut" | "backOutIn" | "bounceIn" | "bounceOut" | "bounceInOut" | "bounceOutIn"
使用示例:
/**对this.Node展示动画 */
private _playAnim() {cc.Tween.stopAllByTarget(this.Node);this.Node.setPosition(0, 1500, 0);cc.tween(this.Node).to(0.2, { position: cc.v3(0, -500, 0) }, { easing: "smooth" }).to(0.1, { position: cc.v3(0, 0, 0) }, { easing: "smooth" }).start();
}