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](/images/articles/how-to-play-%20cocos-studio-%20sprite-animation-action-time-line/Untitled-6.png)
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);
Original