cocos2d-iphone  2.1
Improved Cocos2D API Reference (iOS version) for www.kobold2d.com developers
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Defines
CCAnimationCache Class Reference

#import <CCAnimationCache.h>

List of all members.

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

Detailed Description

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.

Since:
v0.99.5

Member Function Documentation

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

Since:
v1.1
- (void) addAnimationsWithFile: (NSString *)  plist

Adds an animation from a plist file. Make sure that the frames were previously loaded in the CCSpriteFrameCache.

Since:
v1.1
- (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.

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


The documentation for this class was generated from the following file: