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

Class Methods

purgeSharedAnimationCache

Purges the cache. It releases all the CCAnimation objects and the shared instance.

+ (void)purgeSharedAnimationCache

Declared In

CCAnimationCache.h

sharedAnimationCache

Returns the shared instance of the Animation cache

+ (CCAnimationCache *)sharedAnimationCache

Declared In

CCAnimationCache.h

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

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.

- (CCAnimation *)animationByName:(NSString *)name

Declared In

CCAnimationCache.h

removeAnimationByName:

Deletes a CCAnimation from the cache.

- (void)removeAnimationByName:(NSString *)name

Declared In

CCAnimationCache.h