Class CCAnimationCache

#include <Geode/cocos/sprite_nodes/CCAnimationCache.h>
classCCAnimationCache:publiccocos2d::CCObject{ ... }

Since v0.99.5

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.

Examples0
Public static methods2
staticcocos2d::CCAnimationCache*sharedAnimationCache()

Returns the shared instance of the Animation cache

staticvoidpurgeSharedAnimationCache()

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

Public member functions6
voidaddAnimation(,)

Adds a CCAnimation with a name.

voidremoveAnimationByName()

Deletes a CCAnimation from the cache.

cocos2d::CCAnimation*animationByName()

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.

voidaddAnimationsWithDictionary(,)

Since v1.1

Adds an animation from an NSDictionary Make sure that the frames were previously loaded in the CCSpriteFrameCache.

Parameters

plist

The path of the relative file,it use to find the plist path for load SpriteFrames.
voidaddAnimationsWithFile()

Since v1.1

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

boolinit()
No description provided
Fields0
Protected member functions0
Protected fields0