tween(nodeV)
.sequence(
tween().parallel(tween().to(0.5, { scale: new Vec3(2, 2, 2) }, { easing: ‘sineOut’ }), tween().to(0.5, { opacity: 0 })),
tween().call(() => {
nodeV.active = false;
}),
tween().call(() => {
this.node.active = true;
}),
)
.start();
@Tom_k pls help me!
What is the version of Cocos?
cocos creator ver 3.8.5
@Tom_k pls help me!
Please try the code below:
tween(this.nodeV) .sequence( tween().parallel(tween().to(0.5, { scale: new Vec3(2, 2, 2) }, { easing: 'sineOut' }), tween(this.nodeV.getComponent(UIOpacity) as UIOpacity).to(0.5, { opacity: 0 })), tween().call(() => {this.nodeV.active = false;}), tween().call(() => {this.node.active = true;}), ) .start();
Here is the link for your reference. Tween Example | Cocos Creator
1 Like
You might need to ensure that the opacity change applies to the correct component, like nodeV.getComponent(UIOpacity).opacity = 0
. Have you tried that?