http://cocos2d-x.org/projects/cocos2d-x/wiki/Animations
There is an example file animation.
In this example, C++ code that looks like this:
- CCAnimationCache *cache = CCAnimationCache::sharedAnimationCache(); // “caches” are always singletons in cocos2d
- cache~~>addAnimationsWithFile;
# CCAnimation animation = cache~~>animationByName(“dance_1”); // I apologize for this method name, it should be getAnimationByName(…) in future versions - CCAnimate animate = CCAnimate::create(animation); // Don’t confused between CCAnimation and CCAnimate
- sprite->runAction(animate);
How should contain of .plist-file?
Сan demonstrate an example?