CCArmature is not a Action, so what if I need the animation be a action in sequence? Why it is so big different with original cocos2d?
I’ve just made a game using CocoStudio and indeed i found is annoying to work with Armatures. What i did is create lots of callback functions and just animate by playing an animation during a delay and then calling next callback function.
pArmature1->getAnimation()>play;>getAnimation()
pArmature2>play;>runAction(CCSequence::create(
//Callback after finish.
pArmature_node
CCDelayTime::create(duration_of_animation),CCCallFuncO::create(this,callfuncO_selector(HelloWorld::CallbackX),this), NULL) );
I dont know if there is a cleaner way to work, i hope so, becouse this way is really bad.
How to get the “duration_of_animation”? There is no way to get the playing time from CCArmatureAnimation.
I want some geme demo with using CCArmature;Could I use it like a CCSprite……
Oh, CCArmature has callback function, and these functions is very convenience.
you can refer to the testcpp and also https://github.com/shujunqiao/IronCity.git, https://github.com/yuye-liu/CocostudioIronCity.git.
void setMovementEventCallFunc(CCObject *target, SEL_MovementEventCallFunc callFunc);
void setFrameEventCallFunc(CCObject *target, SEL_FrameEventCallFunc callFunc);