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.
Class CCAnimationCache
#include <Geode/cocos/sprite_nodes/CCAnimationCache.h>
classCCAnimationCache:publiccocos2d::CCObject{ ... }
Examples0
Public static methods2
Public member functions6
voidaddAnimation(cocos2d::CCAnimation*animation,charconst*name)
Adds a CCAnimation with a name.
voidremoveAnimationByName(charconst*name)
Deletes a CCAnimation from the cache.
cocos2d::CCAnimation*animationByName(charconst*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.
voidaddAnimationsWithDictionary(cocos2d::CCDictionary*dictionary,charconst*plist)
Adds an animation from an NSDictionary Make sure that the frames were previously loaded in the CCSpriteFrameCache.
plist
The path of the relative file,it use to find the plist path for load SpriteFrames.
voidaddAnimationsWithFile(charconst*plist)
Adds an animation from a plist file. Make sure that the frames were previously loaded in the CCSpriteFrameCache.
boolinit()
No description provided
Fields1
cocos2d::CCDictionary*m_pAnimations;
No description provided