Cc.tween doesn't work with repeat(n)

Hello all,

I cannot make tween work with repeat() or repeatForever(). Some body can help?

Here is my code on Cocos Creator 2.4.3

 cc.tween(this.node)
 .to(0.2, { angle: 45 })
 .to(0.2, { angle: -45 })
 .to(0.2, { angle: 0 })
.repeat(10)
.start();

Regards,
Brian

1 Like

Can you provide a demo that reproduces the problem?

1 Like

Thank you for replying, here is my Cocos Creator source code.TextTwin.zip (933.3 KB)

cc.tween(this.node)
   .repeat(10,
     cc.tween().to(0.2, { angle: 45 })
      .to(0.2, { angle: -45 })
      .to(0.2, { angle: 0 })
     )
.start()
1 Like

or

cc.tween(this.node)
   .repeatForever(
     cc.tween().to(0.2, { angle: 45 })
        .to(0.2, { angle: -45 })
        .to(0.2, { angle: 0 }))
.start()
2 Likes

Thank you Zakhar

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.