|
cocos2d-iphone
2.1
Improved Cocos2D API Reference (iOS version) for www.kobold2d.com developers
|
#import <CCAnimationCache.h>
Public Member Functions | |
| (void) | - addAnimation:name: |
| (void) | - removeAnimationByName: |
| (CCAnimation *) | - animationByName: |
| (void) | - addAnimationsWithDictionary: |
| (void) | - addAnimationsWithFile: |
Static Public Member Functions | |
| (CCAnimationCache *) | + sharedAnimationCache |
| (void) | + purgeSharedAnimationCache |
Protected Attributes | |
| NSMutableDictionary * | _animations |
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.
| - (void) addAnimation: | (CCAnimation *) | animation | |
| name: | (NSString *) | name | |
Adds a CCAnimation with a name.
| - (void) addAnimationsWithDictionary: | (NSDictionary *) | dictionary |
Adds an animation from an NSDictionary Make sure that the frames were previously loaded in the CCSpriteFrameCache.
| - (void) addAnimationsWithFile: | (NSString *) | plist |
Adds an animation from a plist file. Make sure that the frames were previously loaded in the CCSpriteFrameCache.
| - (CCAnimation*) animationByName: | (NSString *) | name |
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) purgeSharedAnimationCache |
Purges the cache. It releases all the CCAnimation objects and the shared instance.
| - (void) removeAnimationByName: | (NSString *) | name |
Deletes a CCAnimation from the cache.
Returns the shared instance of the Animation cache