How to play cocos studio sprite animation (ActionTimeLine)

Post Reply
User avatar
admin
Site Admin
Posts: 29
Joined: Nov 24th, '23, 09:57

How to play cocos studio sprite animation (ActionTimeLine)

Post by admin »

Play Cocos Studio Sprite Animation 

There is simple way to play cocos sprite animation created from cocos studio.

The way to do it 

1. create sprite as plist file which is use for sprite animation
2. import plist file to cocos studio
3. create sprite animation in cocos studio
4. add C++ code in visual studio
5. excute it
6. oh~ nice good very very good.

Now, you can customize it.

Image

here is source code what i copy and paste in video.

Code: Select all

ActionTimeline *actionTimeline = CSLoader::createTimeline("IntroScene.csb");
actionTimeline->setTimeSpeed(2.0f);
actionTimeline->gotoFrameAndPlay(0);
this->runAction(actionTimeline);
All steps are recorded as Video. Just check it once



Original
Post Reply