Hi all,
I have looked for the cocos2d-x v3 tutorial from internet for a week, but will cant find a good tutorial that can teach me how to do the animation by using sprite sheet. >_<
I have done the plist and png by using texturePacker (please find the attached files), anyone can teach me to play the simple animation from the test.png ( the png included 11 images).
Actually in the era of data oriented design composing frames into animation sequence directly in the code looks like a stone age.
There is the AnimationCache class which can load animations from the xml/plist-file. But I wonder which editor/tool can be used to create those files (googling did not help).
so I should add these frames to SpriteFrameCache before AnimationCache::getInstance()->addAnimationsWithFile("animations/animations.plist");
am I right?
2.There isn’t any tool to create these files as @dotsquid said,is there?
I believe you do need to add the frames to SpriteFrameCache before loading the animation plist.
I, unfortunately, do not know what tools might be available to create these animation plists. I did a little bit of googling and it seems like “SpriteHelper 2” might work, but the full version costs money and I haven’t tried out the trial version yet…
@libragagu My and your code to create sprite animation both gets executed successfully but all i can see is black screen. I have kept .plist file and png in resources folder. Where should i put it. What might be wrong here. Please help…M new to cocos2dx.