CCAnimationCache Class Reference
| Inherits from | NSObject |
| Declared in | CCAnimationCache.h |
Overview
Singleton that manages the CCAnimation objects. It saves in a cache the animations. You should use this class if you want to save your animations in a cache.
Tasks
-
+ sharedAnimationCacheReturns the shared instance of the Animation cache
-
+ purgeSharedAnimationCachePurges the cache. It releases all the CCAnimation objects and the shared instance.
-
– addAnimation:name:Adds a CCAnimation with a name.
-
– removeAnimationByName:Deletes a CCAnimation from the cache.
-
– animationByName: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.
-
– addAnimationsWithDictionary:Adds an animation from an NSDictionary Make sure that the frames were previously loaded in the CCSpriteFrameCache.
-
– addAnimationsWithFile:Adds an animation from a plist file. Make sure that the frames were previously loaded in the CCSpriteFrameCache.
Class Methods
Instance Methods
addAnimation:name:
Adds a CCAnimation with a name.
- (void)addAnimation:(CCAnimation *)animation name:(NSString *)nameDeclared In
CCAnimationCache.haddAnimationsWithDictionary:
Adds an animation from an NSDictionary Make sure that the frames were previously loaded in the CCSpriteFrameCache.
- (void)addAnimationsWithDictionary:(NSDictionary *)dictionaryAvailability
Declared In
CCAnimationCache.haddAnimationsWithFile:
Adds an animation from a plist file. Make sure that the frames were previously loaded in the CCSpriteFrameCache.
- (void)addAnimationsWithFile:(NSString *)plistAvailability
Declared In
CCAnimationCache.h