user1179321
user1179321

Reputation: 801

Editing Timeline from CCB file in cocos

I did some research into this and couldn't really find anything, so if this is a repetitive question I apologize. but anyway I have made a CCB file in CocosBuilder and I would like to start the timeline, for example, at one second instead of playing from the beginning. Is there a way to do this? Thanks for the help guys.

Edit: i would like this to be done in the code.

Upvotes: 0

Views: 101

Answers (1)

Alok Rao
Alok Rao

Reputation: 162

  • I am using 2.2.1 Cocos2DX version. I think there is no option to play it from given interval. But you can tweak yourself to get it done. (Not simple one)

    • You have to go to CCBAnimationManager and there you get "mNodeSequences".
    • It is dictionary and you get difference properties there like "rotation position etc..." values there.
    • Internally AnimationManager reads this value (These values are specified in your CCB) and puts in runAction queue.
    • So you have to break it as you want.(Ex. 5 min timeline you have. But you want to start from 1 min then you have run first 1 min Actions without delay and for remaining you have properly calculate tween intervals.

It's long procedure and needs calculation. If you don't know any other simpler way try this. If you know pls let us know (Post it).

Upvotes: 0

Related Questions