Singleton that manages the Animations. More...
Inherits Ref.
Public Member Functions | |
void | addAnimation (Animation *animation, const std::string &name) |
Adds a Animation with a name. More... | |
var | addAnimation ( var animation, var name) |
Adds a Animation with a name. More... | |
local | addAnimation ( local animation, local name) |
Adds a Animation with a name. More... | |
void | removeAnimation (const std::string &name) |
Deletes a Animation from the cache. More... | |
local | removeAnimation ( local name) |
Deletes a Animation from the cache. More... | |
void | removeAnimationByName (const std::string &name) |
Animation * | getAnimation (const std::string &name) |
Returns a Animation that was previously added. More... | |
var | getAnimation ( var name) |
Returns a Animation that was previously added. More... | |
local | getAnimation ( local name) |
Returns a Animation that was previously added. More... | |
Animation * | animationByName (const std::string &name) |
void | addAnimationsWithDictionary (const ValueMap &dictionary, const std::string &plist) |
Adds an animation from an VaulueMap. More... | |
void | addAnimationsWithFile (const std::string &plist) |
Adds an animation from a plist file. More... | |
Public Member Functions inherited from Ref | |
void | retain () |
Retains the ownership. More... | |
local | retain () |
Retains the ownership. More... | |
void | release () |
Releases the ownership immediately. More... | |
Ref * | autorelease () |
Releases the ownership sometime soon automatically. More... | |
unsigned int | getReferenceCount () const |
Returns the Ref's current reference count. More... | |
local | getReferenceCount () |
Returns the Ref's current reference count. More... | |
virtual | ~Ref () |
Destructor. | |
Static Public Member Functions | |
static AnimationCache * | getInstance () |
Returns the shared instance of the Animation cache. | |
local | getInstance () |
Returns the shared instance of the Animation cache. | |
static void | destroyInstance () |
Purges the cache. More... | |
local | destroyInstance () |
Purges the cache. More... | |
static AnimationCache * | sharedAnimationCache () |
var | sharedAnimationCache () |
local | sharedAnimationCache () |
static void | purgeSharedAnimationCache () |
var | purgeSharedAnimationCache () |
local | purgeSharedAnimationCache () |
Additional Inherited Members | |
Public Attributes inherited from Ref | |
unsigned int | _ID |
object id, ScriptSupport need public _ID | |
local | _ID |
object id, ScriptSupport need public _ID | |
int | _luaID |
Lua reference id. | |
local | _luaID |
Lua reference id. | |
void * | _scriptObject |
scriptObject, support for swift | |
local | _scriptObject |
scriptObject, support for swift | |
bool | _rooted |
When true, it means that the object was already rooted. | |
local | _rooted |
When true, it means that the object was already rooted. | |
bool | _scriptOwned |
The life of the object is scrolled by the scripting engine. More... | |
local | _scriptOwned |
The life of the object is scrolled by the scripting engine. More... | |
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 Sprite. Since v0.99.5, you should use this class instead.
|
static |
Purges the cache.
It releases all the Animation objects and the shared instance.
|
static |
Purges the cache.
It releases all the Animation objects and the shared instance.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
void addAnimation | ( | Animation * | animation, |
const std::string & | name | ||
) |
Adds a Animation with a name.
An animation. The name of animation.
var addAnimation | ( | var | animation, |
var | name | ||
) |
Adds a Animation with a name.
An animation. The name of animation.
local addAnimation | ( | local | animation, |
local | name | ||
) |
Adds a Animation with a name.
An animation. The name of animation.
void removeAnimation | ( | const std::string & | name | ) |
Deletes a Animation from the cache.
The name of animation.
var removeAnimation | ( | var | name | ) |
Deletes a Animation from the cache.
The name of animation.
local removeAnimation | ( | local | name | ) |
Deletes a Animation from the cache.
The name of animation.
|
inline |
Animation* getAnimation | ( | const std::string & | name | ) |
var getAnimation | ( | var | name | ) |
local getAnimation | ( | local | name | ) |
|
inline |
void addAnimationsWithDictionary | ( | const ValueMap & | dictionary, |
const std::string & | plist | ||
) |
Adds an animation from an VaulueMap.
Make sure that the frames were previously loaded in the SpriteFrameCache. An ValueMap. The path of the relative file,it use to find the plist path for load SpriteFrames.
local addAnimationsWithDictionary | ( | local | dictionary, |
local | plist | ||
) |
Adds an animation from an VaulueMap.
Make sure that the frames were previously loaded in the SpriteFrameCache. An ValueMap. The path of the relative file,it use to find the plist path for load SpriteFrames.
void addAnimationsWithFile | ( | const std::string & | plist | ) |
Adds an animation from a plist file.
Make sure that the frames were previously loaded in the SpriteFrameCache.
var addAnimations | ( | var | plist | ) |
Adds an animation from a plist file.
Make sure that the frames were previously loaded in the SpriteFrameCache.
local addAnimations | ( | local | plist | ) |
Adds an animation from a plist file.
Make sure that the frames were previously loaded in the SpriteFrameCache.