Class ccs.ArmatureDataManager

Class Summary
Constructor Attributes Constructor Name and Description
 
format and manage armature configuration and armature animation

Method Summary

Class Detail

ccs.ArmatureDataManager()
format and manage armature configuration and armature animation

Method Detail

  • addAnimationData(id, animationData, configFilePath)
    add animation data
    Parameters:
    {String} id
    {ccs.AnimationData} animationData
    configFilePath
  • addArmatureData(id, armatureData, configFilePath)
    Add armature data
    Parameters:
    {string} id
    The id of the armature data
    {ccs.ArmatureData} armatureData
    configFilePath
  • addArmatureFileInfo(imagePath, plistPath, configFilePath)
    Add ArmatureFileInfo, it is managed by CCArmatureDataManager.
    //example1
    ccs.ArmatureDataManager.getInstance().addArmatureFileInfo("res/test.json");
    //example2
    ccs.ArmatureDataManager.getInstance().addArmatureFileInfo("res/test.png","res/test.plist","res/test.json");
    Parameters:
    {String} imagePath
    {String} plistPath
    {String} configFilePath
  • addArmatureFileInfoAsync(imagePath, plistPath, configFilePath, target, configFilePath)
    Add ArmatureFileInfo, it is managed by CCArmatureDataManager.
    Parameters:
    {String} imagePath
    {String} plistPath
    {String} configFilePath
    {Object} target
    {Function} configFilePath
  • addRelativeData(configFilePath)
    add RelativeData
    Parameters:
    {String} configFilePath
  • addSpriteFrameFromFile(plistPath, imagePath, configFilePath)
    Add sprite frame to CCSpriteFrameCache, it will save display name and it's relative image name
    Parameters:
    {String} plistPath
    {String} imagePath
    configFilePath
  • addTextureData(id, textureData, configFilePath)
    add texture data
    Parameters:
    {String} id
    {ccs.TextureData} textureData
    configFilePath
  • {ccs.AnimationData} getAnimationData(id)
    get animationData by id
    Parameters:
    {String} id
    Returns:
    {ccs.AnimationData}
  • {Object} getAnimationDatas()
    get animationDatas
    Returns:
    {Object}
  • {ccs.ArmatureData} getArmatureData(id)
    get armatureData by id
    Parameters:
    {String} id
    Returns:
    {ccs.ArmatureData}
  • {Object} getArmatureDatas()
    get armatureDatas
    Returns:
    {Object}
  • <static> {ccs.ArmatureDataManager} ccs.ArmatureDataManager.getInstance()
    returns a shared instance of the ArmatureDataManager
    Returns:
    {ccs.ArmatureDataManager}
  • {ccs.RelativeData} getRelativeData(configFilePath)
    get RelativeData
    Parameters:
    {String} configFilePath
    Returns:
    {ccs.RelativeData}
  • {ccs.TextureData} getTextureData(id)
    get textureData by id
    Parameters:
    {String} id
    Returns:
    {ccs.TextureData}
  • {Object} getTextureDatas()
    get textureDatas
    Returns:
    {Object}
  • removeAnimationData(id)
    remove animation data
    Parameters:
    {string} id
  • removeArmatureData(id)
    remove armature data
    Parameters:
    {string} id
  • removeArmatureFileInfo(configFilePath)
    remove armature cache data by configFilePath
    Parameters:
    {String} configFilePath
  • removeTextureData(id)
    remove texture data
    Parameters:
    {string} id