Class ccs.Skin

Class Summary
Constructor Attributes Constructor Name and Description
 
ccs.Bone uses ccs.Skin to displays on screen.

Method Summary

Class Detail

ccs.Skin()
ccs.Bone uses ccs.Skin to displays on screen.

Field Detail

{ccs.Bone} bone
- The bone of the skin
{String} displayName
- <@readonly> The displayed name of skin
{Object} skinData
- The data of the skin

Method Detail

  • <static> {ccs.Skin} ccs.Skin.create(fileName, rect)
    allocates and initializes a skin.
    // example
    var skin = ccs.Skin.create("res/test.png",cc.rect(0,0,50,50));
    var skin = ccs.Skin.create("#test.png");             //=> ccs.Skin.createWithSpriteFrameName("test.png");
    Parameters:
    {String} fileName Optional
    fileName or sprite frame name
    {cc.Rect} rect Optional
    Returns:
    {ccs.Skin}
  • <static> {ccs.Skin} ccs.Skin.createWithSpriteFrameName(spriteFrameName)
    allocates and initializes a skin.
    // example
    var skin = ccs.Skin.createWithSpriteFrameName("test.png");
    Parameters:
    {String} spriteFrameName
    Returns:
    {ccs.Skin}
  • {String} getDisplayName()
    display name getter
    Returns:
    {String}