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
-
+ sharedAnimationCache
Returns the shared instance of the Animation cache
-
+ purgeSharedAnimationCache
Purges 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 *)name
Declared In
CCAnimationCache.h
addAnimationsWithDictionary:
Adds an animation from an NSDictionary Make sure that the frames were previously loaded in the CCSpriteFrameCache.
- (void)addAnimationsWithDictionary:(NSDictionary *)dictionary
Availability
Declared In
CCAnimationCache.h
addAnimationsWithFile:
Adds an animation from a plist file. Make sure that the frames were previously loaded in the CCSpriteFrameCache.
- (void)addAnimationsWithFile:(NSString *)plist
Availability
Declared In
CCAnimationCache.h