|
cocos2d-iphone
1.0.1
Improved Cocos2D API Reference (iOS version) for Kobold2D developers
|
#include <CCAnimationCache.h>
Public Member Functions | |
| void | addAnimation:name: (CCAnimation *animation,[name] NSString *name) |
| void | removeAnimationByName: (NSString *name) |
| CCAnimation * | animationByName: (NSString *name) |
Static Public Member Functions | |
| CCAnimationCache * | sharedAnimationCache () |
| void | purgeSharedAnimationCache () |
Protected Attributes | |
| NSMutableDictionary * | animations_ |
Singleton that manages the Animations. It saves in a cache the animations. You should use this class if you want to save your animations in a cache.
Before v0.99.5, the recommend way was to save them on the CCSprite. Since v0.99.5, you should use this class instead.
| void CCAnimationCache::addAnimation:name: | ( | CCAnimation * | animation, |
| [name] NSString * | name | ||
| ) | [virtual] |
Adds a CCAnimation with a name.
| CCAnimation* CCAnimationCache::animationByName: | ( | NSString * | name | ) | [virtual] |
Returns a CCAnimation that was previously added. If the name is not found it will return nil. You should retain the returned copy if you are going to use it.
| void CCAnimationCache::purgeSharedAnimationCache | ( | ) | [static, virtual] |
Purges the cache. It releases all the CCAnimation objects and the shared instance.
| void CCAnimationCache::removeAnimationByName: | ( | NSString * | name | ) | [virtual] |
Deletes a CCAnimation from the cache.
| CCAnimationCache * CCAnimationCache::sharedAnimationCache | ( | ) | [static, virtual] |
Retruns ths shared instance of the Animation cache