Hey i’m trying to make an swipe animation that lasts forever.
But the code down below does nothing i don’t know why. I used cocos2dx before and there were tween called callfunc
allows you to call something without waiting another tween in sequence.
I’m trying to make same thing like so i want to appear something in 1 second but when it’s on .5 second i want to started to move.
tween(node).sequence(
tween(node).call(()=>{this.playFadeInAnimation()}),
tween(node).delay(moveDuration * .35),
tween(node).call(()=>{tween(node).to(moveDuration, { position: new Vec3(startPosition.x, startPosition.y)}, {easing: 'sineOut'})}),
tween(node).delay(moveDuration * .7),
tween(node).call(()=>{this.getFadeOutAnimation()}),
tween(node).call(()=>{tween(node).to(moveDuration, { position: new Vec3(endPosition.x, endPosition.y)}, {easing: 'sineOut'})}),
).repeatForever().start();