Singleton that manages the Animations. More...
#include <CCAnimationCache.h>
Public Member Functions | |
CCAnimationCache () | |
~CCAnimationCache () | |
void | addAnimation (CCAnimation *animation, const char *name) |
Adds a CCAnimation with a name. More... | |
void | removeAnimationByName (const char *name) |
Deletes a CCAnimation from the cache. More... | |
CCAnimation * | animationByName (const char *name) |
Returns a CCAnimation that was previously added. More... | |
void | addAnimationsWithDictionary (CCDictionary *dictionary) |
Adds an animation from an NSDictionary Make sure that the frames were previously loaded in the CCSpriteFrameCache. More... | |
void | addAnimationsWithFile (const char *plist) |
Adds an animation from a plist file. More... | |
bool | init (void) |
![]() | |
CCObject (void) | |
virtual | ~CCObject (void) |
void | release (void) |
void | retain (void) |
CCObject * | autorelease (void) |
CCObject * | copy (void) |
bool | isSingleReference (void) const |
unsigned int | retainCount (void) const |
virtual bool | isEqual (const CCObject *pObject) |
virtual void | acceptVisitor (CCDataVisitor &visitor) |
virtual void | update (float dt) |
![]() | |
virtual CCObject * | copyWithZone (CCZone *pZone) |
Static Public Member Functions | |
static CCAnimationCache * | sharedAnimationCache (void) |
Returns the shared instance of the Animation cache. More... | |
local | sharedAnimationCache () |
Returns the shared instance of the Animation cache. More... | |
static void | purgeSharedAnimationCache (void) |
Purges the cache. More... | |
Additional Inherited Members | |
![]() | |
unsigned int | m_uID |
int | m_nLuaID |
![]() | |
unsigned int | m_uReference |
unsigned int | m_uAutoReleaseCount |
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.
CCAnimationCache | ( | ) |
var ctor | ( | ) |
local CCAnimationCache | ( | ) |
~CCAnimationCache | ( | ) |
void addAnimation | ( | CCAnimation * | animation, |
const char * | name | ||
) |
Adds a CCAnimation with a name.
var addAnimation | ( | var | animation, |
var | name | ||
) |
Adds a CCAnimation with a name.
local addAnimation | ( | local | animation, |
local | name | ||
) |
Adds a CCAnimation with a name.
void addAnimationsWithDictionary | ( | CCDictionary * | dictionary) |
Adds an animation from an NSDictionary Make sure that the frames were previously loaded in the CCSpriteFrameCache.
var addAnimationsWithDictionary | ( | var | dictionary) |
Adds an animation from an NSDictionary Make sure that the frames were previously loaded in the CCSpriteFrameCache.
local addAnimationsWithDictionary | ( | local | dictionary) |
Adds an animation from an NSDictionary Make sure that the frames were previously loaded in the CCSpriteFrameCache.
void addAnimationsWithFile | ( | const char * | plist) |
Adds an animation from a plist file.
Make sure that the frames were previously loaded in the CCSpriteFrameCache.
var addAnimations | ( | var | plist) |
Adds an animation from a plist file.
Make sure that the frames were previously loaded in the CCSpriteFrameCache.
local addAnimationsWithFile | ( | local | plist) |
Adds an animation from a plist file.
Make sure that the frames were previously loaded in the CCSpriteFrameCache.
CCAnimation* animationByName | ( | const char * | 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.
var getAnimation | ( | var | 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.
local animationByName | ( | local | 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.
bool init | ( | void | ) |
var init | ( | ) |
local init | ( | ) |
|
static |
Purges the cache.
It releases all the CCAnimation objects and the shared instance.
|
static |
Purges the cache.
It releases all the CCAnimation objects and the shared instance.
|
static |
Purges the cache.
It releases all the CCAnimation objects and the shared instance.
void removeAnimationByName | ( | const char * | name) |
Deletes a CCAnimation from the cache.
var removeAnimation | ( | var | name) |
Deletes a CCAnimation from the cache.
local removeAnimationByName | ( | local | name) |
Deletes a CCAnimation from the cache.
|
static |
Returns the shared instance of the Animation cache.
|
static |
Returns the shared instance of the Animation cache.
|
static |
Returns the shared instance of the Animation cache.