Namespace cc.animationCache
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.
example
cc.animationCache.addAnimation(animation,"animation1");
- Defined in: CCAnimationCache.js
Method Summary
Method Detail
-
addAnimation(animation, name)Adds a cc.Animation with a name.
- Parameters:
- {cc.Animation} animation
- {String} name
-
addAnimations(plist)
Adds an animation from a plist file.
Make sure that the frames were previously loaded in the cc.SpriteFrameCache.- Parameters:
- {String} plist
-
{cc.Animation} getAnimation(name)
Returns a cc.Animation 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.- Parameters:
- {String} name
- Returns:
- {cc.Animation}
-
removeAnimation(name)Deletes a cc.Animation from the cache.
- Parameters:
- {String} name