cocos2d-x  3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ArmatureDataManager Class Reference

format and manage armature configuration and armature animation More...

#include <CCArmatureDataManager.h>

Inheritance diagram for ArmatureDataManager:
Ref

Public Member Functions

virtual bool init ()
 Init ArmatureDataManager. More...
 
void addArmatureData (const std::string &id, ArmatureData *armatureData, const std::string &configFilePath="")
 Add armature data. More...
 
ArmatureDatagetArmatureData (const std::string &id)
 get armature data More...
 
void removeArmatureData (const std::string &id)
 remove armature data More...
 
void addAnimationData (const std::string &id, AnimationData *animationData, const std::string &configFilePath="")
 add animation data More...
 
AnimationDatagetAnimationData (const std::string &id)
 get animation data from _animationDatas(Dictionary) More...
 
void removeAnimationData (const std::string &id)
 remove animation data More...
 
void addTextureData (const std::string &id, TextureData *textureData, const std::string &configFilePath="")
 add texture data More...
 
TextureDatagetTextureData (const std::string &id)
 get texture data More...
 
void removeTextureData (const std::string &id)
 remove texture data More...
 
void addArmatureFileInfo (const std::string &configFilePath)
 Add ArmatureFileInfo, it is managed by ArmatureDataManager. More...
 
void addArmatureFileInfoAsync (const std::string &configFilePath, cocos2d::Ref *target, cocos2d::SEL_SCHEDULE selector)
 Add ArmatureFileInfo, it is managed by ArmatureDataManager. More...
 
void addArmatureFileInfo (const std::string &imagePath, const std::string &plistPath, const std::string &configFilePath)
 Add ArmatureFileInfo, it is managed by ArmatureDataManager. More...
 
void addArmatureFileInfoAsync (const std::string &imagePath, const std::string &plistPath, const std::string &configFilePath, cocos2d::Ref *target, cocos2d::SEL_SCHEDULE selector)
 Add ArmatureFileInfo, it is managed by ArmatureDataManager. More...
 
void addSpriteFrameFromFile (const std::string &plistPath, const std::string &imagePath, const std::string &configFilePath="")
 Add sprite frame to CCSpriteFrameCache, it will save display name and it's relative image name. More...
 
virtual void removeArmatureFileInfo (const std::string &configFilePath)
bool isAutoLoadSpriteFile ()
 Juge whether or not need auto load sprite file. More...
 
const cocos2d::Map
< std::string, ArmatureData * > & 
getArmatureDatas () const
const cocos2d::Map
< std::string, AnimationData * > & 
getAnimationDatas () const
const cocos2d::Map
< std::string, TextureData * > & 
getTextureDatas () const
- Public Member Functions inherited from Ref
void retain ()
 Retains the ownership. More...
 
void release ()
 Releases the ownership immediately. More...
 
Refautorelease ()
 Releases the ownership sometime soon automatically. More...
 
unsigned int getReferenceCount () const
 Returns the Ref's current reference count. More...
 
virtual ~Ref ()

Static Public Member Functions

static ArmatureDataManagersharedArmatureDataManager ()
static void purge ()
static ArmatureDataManagergetInstance ()
static void destroyInstance ()

Protected Member Functions

void addRelativeData (const std::string &configFilePath)
RelativeDatagetRelativeData (const std::string &configFilePath)
- Protected Member Functions inherited from Ref
 Ref ()
 Constructor. More...
 

Additional Inherited Members

- Protected Attributes inherited from Ref
unsigned int _referenceCount
 count of references More...
 

Detailed Description

format and manage armature configuration and armature animation

Member Function Documentation

void addAnimationData ( const std::string &  id,
AnimationData animationData,
const std::string &  configFilePath = "" 
)

add animation data

Parameters
idthe id of the animation data
Returns
AnimationData *
void addArmatureData ( const std::string &  id,
ArmatureData armatureData,
const std::string &  configFilePath = "" 
)

Add armature data.

Parameters
idThe id of the armature data
armatureDataArmatureData *
void addArmatureFileInfo ( const std::string &  configFilePath)

Add ArmatureFileInfo, it is managed by ArmatureDataManager.

void addArmatureFileInfo ( const std::string &  imagePath,
const std::string &  plistPath,
const std::string &  configFilePath 
)

Add ArmatureFileInfo, it is managed by ArmatureDataManager.

void addArmatureFileInfoAsync ( const std::string &  configFilePath,
cocos2d::Ref target,
cocos2d::SEL_SCHEDULE  selector 
)

Add ArmatureFileInfo, it is managed by ArmatureDataManager.

It will load data in a new thread

void addArmatureFileInfoAsync ( const std::string &  imagePath,
const std::string &  plistPath,
const std::string &  configFilePath,
cocos2d::Ref target,
cocos2d::SEL_SCHEDULE  selector 
)

Add ArmatureFileInfo, it is managed by ArmatureDataManager.

It will load data in a new thread

void addRelativeData ( const std::string &  configFilePath)
protected
void addSpriteFrameFromFile ( const std::string &  plistPath,
const std::string &  imagePath,
const std::string &  configFilePath = "" 
)

Add sprite frame to CCSpriteFrameCache, it will save display name and it's relative image name.

void addTextureData ( const std::string &  id,
TextureData textureData,
const std::string &  configFilePath = "" 
)

add texture data

Parameters
idthe id of the texture data
Returns
TextureData *
static void destroyInstance ( )
static
AnimationData* getAnimationData ( const std::string &  id)

get animation data from _animationDatas(Dictionary)

Parameters
idthe id of the animation data you want to get
Returns
AnimationData *
const cocos2d::Map<std::string,
AnimationData*>
& getAnimationDatas
( ) const
ArmatureData* getArmatureData ( const std::string &  id)

get armature data

Parameters
idthe id of the armature data you want to get
Returns
ArmatureData *
const cocos2d::Map<std::string,
ArmatureData*>
& getArmatureDatas
( ) const
static ArmatureDataManager*
getInstance
( )
static
RelativeData* getRelativeData ( const std::string &  configFilePath)
protected
TextureData* getTextureData ( const std::string &  id)

get texture data

Parameters
idthe id of the texture data you want to get
Returns
TextureData *
const cocos2d::Map<std::string,
TextureData*>& getTextureDatas
( ) const
virtual bool init ( )
virtual
bool isAutoLoadSpriteFile ( )

Juge whether or not need auto load sprite file.

static void purge ( )
inlinestatic
Deprecated:
Use destoryInstance() instead
void removeAnimationData ( const std::string &  id)

remove animation data

Parameters
idthe id of the animation data
void removeArmatureData ( const std::string &  id)

remove armature data

Parameters
idthe id of the armature data you want to get
virtual void removeArmatureFileInfo ( const std::string &  configFilePath)
virtual
void removeTextureData ( const std::string &  id)

remove texture data

Parameters
idthe id of the texture data you want to get
static ArmatureDataManager*
sharedArmatureDataManager
( )
inlinestatic

The documentation for this class was generated from the following file: