cocos2d for iPhone 1.0.0
2D engine for iOS and OS X
Public Member Functions | Static Public Member Functions
CCAnimationCache Class Reference

#import <CCAnimationCache.h>

List of all members.

Public Member Functions

(void) - addAnimation:name:
(void) - removeAnimationByName:
(CCAnimation *) - animationByName:

Static Public Member Functions

(CCAnimationCache *) + sharedAnimationCache
(void) + purgeSharedAnimationCache

Detailed Description

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.

Since:
v0.99.5

Definition at line 38 of file CCAnimationCache.h.


Member Function Documentation

- (void) addAnimation: (CCAnimation *)  animation
name: (NSString *)  name 

Adds a CCAnimation with a name.

- (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.

+ (CCAnimationCache *) sharedAnimationCache

Retruns ths shared instance of the Animation cache


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Defines

cocos2d for iPhone API Reference - Generated using Doxygen 1.7.4