咨询使用cocosstudio的动画的问题

一个角色,在不同的状态下有不同的动作。
现在用CocosStudi分别做了这些动作,但是怎么切换使用了?

使用
role->init(“waiting”);
role->getAnimation()->playWithIndex(0);
之后,如何把播放的动画切换到run,jump这些动画上去了?
只能把这全部的动画放到一个文件里面,然后用playWithIndex(1); playWithIndex2);。。。这样的来实现么?

ps:role是个继承了CCArmature类的对象。
在初始化阶段,使用了
CCArmatureDataManager::sharedArmatureDataManager()->addArmatureFileInfo(“animation/waiting0.png”,“animation/waiting0.plist”,“animation/waiting.ExportJson”);
CCArmatureDataManager::sharedArmatureDataManager()->addArmatureFileInfo(“animation/run0.png”,“animation/run0.plist”,“animation/run.ExportJson”);
CCArmatureDataManager::sharedArmatureDataManager()->addArmatureFileInfo(“animation/jump0.png”,“animation/jump0.plist”,“animation/jump.ExportJson”);
。。。
把动画读进内存

使用play(“XXX”) 可以按名称播放。

同一个角色的动画放在同一个动画工程比较好、。

— Begin quote from ____

引用第1楼东扬冬阳于2015-02-04 17:33发表的 :
使用play(“XXX”) 可以按名称播放。 http://www.cocoachina.com/bbs/job.php?action=topost&tid=284528&pid=1237455

— End quote

可是这个play(name)也是播放的同一个CCArmatureAnimation中的动画吧?

CCArmatureDataManager::sharedArmatureDataManager()->addArmatureFileInfo(“animation/waiting0.png”,“animation/waiting0.plist”,“animation/waiting.ExportJson”);
CCArmatureDataManager::sharedArmatureDataManager()->addArmatureFileInfo(“animation/run0.png”,“animation/run0.plist”,“animation/run.ExportJson”);
CCArmatureDataManager::sharedArmatureDataManager()->addArmatureFileInfo(“animation/jump0.png”,“animation/jump0.plist”,“animation/jump.ExportJson”);

这里貌似是添加了三个不同的CCArmatureAnimation对象吧?

我刚刚试了切换状态的时候,role->getAnimation()->play(“run”);这个时候
m_pMovementData = m_pAnimationData->getMovement(animationName);
CCAssert(m_pMovementData, “m_pMovementData can not be null”);
会产生空指针,然后中断。

尝试这样写
//role->init(“run”);
//role->setTextureAtlas(NULL);
//role->getAnimation()->playWithIndex(0);
能够达到预期效果,但是还没检查内存是否正确分配释放。
但是这样的使用我觉得是不规范的。

PS:动画工程是朋友帮忙做的,这个也只是帮忙给朋友做个小demo,新手继续求帮助

估计没办法。
2.1倒是可以,2.1灵活得多。

— Begin quote from ____

引用第4楼东扬冬阳于2015-02-05 14:42发表的 回 3楼(燃烧吧-脂肪) 的帖子 :
估计没办法。
2.1倒是可以,2.1灵活得多。 http://www.cocoachina.com/bbs/job.php?action=topost&tid=284528&pid=1238227

— End quote

是cocosstudio2.1么?
我用的是cocos2dx2.5,cocosstudio1.6
看来是不支持咯?