axmol/tools/tolua++/CCAnimationCache.pkg

33 lines
783 B
Plaintext

#include "CCObject.h"
#include "CCMutableDictionary.h"
#include <string>
namespace cocos2d
{
class CCAnimation;
/** 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
*/
class CCAnimationCache : public CCObject
{
CCAnimationCache();
static CCAnimationCache* sharedAnimationCache(void);
static void purgeSharedAnimationCache(void);
void addAnimation(CCAnimation *animation, const char * name);
void removeAnimationByName(const char* name);
CCAnimation* animationByName(const char* name);
bool init(void);
};
}