Class ccs.Skin
- Defined in: CCSkin.js
- Extends ccs.Sprite
Constructor Attributes | Constructor Name and Description |
---|---|
ccs.Skin()
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
-
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}
-
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}