cocos2d-iphone  1.0.1
Improved Cocos2D API Reference (iOS version) for Kobold2D developers
CCAnimationCache Interface Reference

#include <CCAnimationCache.h>

List of all members.

Public Member Functions

void addAnimation:name: (CCAnimation *animation,[name] NSString *name)
void removeAnimationByName: (NSString *name)
CCAnimationanimationByName: (NSString *name)

Static Public Member Functions

CCAnimationCachesharedAnimationCache ()
void purgeSharedAnimationCache ()

Protected Attributes

NSMutableDictionary * animations_

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

Member Function Documentation

void CCAnimationCache::addAnimation:name: ( CCAnimation animation,
[name] NSString *  name 
) [virtual]

Adds a CCAnimation with a name.

CCAnimation* CCAnimationCache::animationByName: ( NSString *  name) [virtual]

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 CCAnimationCache::purgeSharedAnimationCache ( ) [static, virtual]

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

void CCAnimationCache::removeAnimationByName: ( NSString *  name) [virtual]

Deletes a CCAnimation from the cache.

CCAnimationCache * CCAnimationCache::sharedAnimationCache ( ) [static, virtual]

Retruns ths shared instance of the Animation cache


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