Skip to main content

Posts

Showing posts from April, 2015

handling multiple sprite animation in cocos2dx3.2

many times in gaming world we need to handle multiple animation for e.g. when hero is running we have to call running sprite or frames when hero is jumping we need to call jumping frame here is my solution for that ==================== .h file // //  spriteSheet.h //  firegame // //  Created by Manish on 22/03/15. // // #ifndef __firegame__spriteSheet__ #define __firegame__spriteSheet__ #include "cocos2d.h" class spriteSheet : public cocos2d :: SpriteBatchNode {     public :         //constructor         spriteSheet();         //destructor         ~spriteSheet();         static spriteSheet * create( /*spritesheet reference*/ std :: string __spriteReference, /*plist reference */ std :: string __plistname, /*first frame of spritesheet*/ std :: string firstframe);             void init...