Hi all, I would like to share a class which I wrote. Its called AdvanceSprite and its basically an easier way to control sprite animations. You can do things like set frame rate for every object, move from any frame to any frame. Loops n number of times etc. I feel its easier than using the CCAction for Sprite Frame animation.
Animation done using Sprite frames by loading Sprite Sheet.
It extends from CCSprite. Its more advance and easy to use then CCAction.
1. Pause animation.
2. Resume animation.
3. Stop animation.
4. Callback after complete the animation.
Additional control are
1. Changing frame rate during running of animation.
2. while running animation we can move to any frames from current running frame.
3. Looping Animation.
4. Reverse Animation with Looping.
5. Delete by itself after complete animation.
AdvanceSprite m_advanceSprite = new AdvanceSprite();
//Add Sprite pList or CCSpriteFrame Array.
m_advanceSprite~~>startAnimation(int startInd, int endInd, int number_Loop, SEL_CallFunc pfnSelectorDelegate, SelectorProtocol *pTarget,int NumberOfFramesPerSecond, bool NeedToRunReverseAnimation, bool NeedToDeleteItself);
//To move to any frame from the current frame
Advance_Sprite_Animation.zip (3.4 KB)