setSkin docs.

This commit is contained in:
NathanSweet 2014-11-17 19:41:50 +01:00
parent 7b3bc205fd
commit 63801b6f13
6 changed files with 18 additions and 14 deletions

View File

@ -214,9 +214,9 @@ public class Skeleton {
return _skin == null ? null : _skin._name; return _skin == null ? null : _skin._name;
} }
/** Sets the skin used to look up attachments not found in the {@link SkeletonData#getDefaultSkin() default skin}. Attachments /** Sets the skin used to look up attachments before looking in the {@link SkeletonData#getDefaultSkin() default skin}.
* from the new skin are attached if the corresponding attachment from the old skin was attached. If there was no old skin, * Attachments from the new skin are attached if the corresponding attachment from the old skin was attached. If there was
* each slot's setup mode attachment is attached from the new skin. * no old skin, each slot's setup mode attachment is attached from the new skin.
* @param newSkin May be null. */ * @param newSkin May be null. */
public function set skin (newSkin:Skin) : void { public function set skin (newSkin:Skin) : void {
if (newSkin) { if (newSkin) {

View File

@ -83,8 +83,9 @@ spSlot* spSkeleton_findSlot (const spSkeleton* self, const char* slotName);
/* Returns -1 if the slot was not found. */ /* Returns -1 if the slot was not found. */
int spSkeleton_findSlotIndex (const spSkeleton* self, const char* slotName); int spSkeleton_findSlotIndex (const spSkeleton* self, const char* slotName);
/* Sets the skin used to look up attachments not found in the SkeletonData defaultSkin. Attachments from the new skin are /* Sets the skin used to look up attachments before looking in the SkeletonData defaultSkin. Attachments from the new skin are
* attached if the corresponding attachment from the old skin was attached. * attached if the corresponding attachment from the old skin was attached. If there was no old skin, each slot's setup mode
* attachment is attached from the new skin.
* @param skin May be 0.*/ * @param skin May be 0.*/
void spSkeleton_setSkin (spSkeleton* self, spSkin* skin); void spSkeleton_setSkin (spSkeleton* self, spSkin* skin);
/* Returns 0 if the skin was not found. See spSkeleton_setSkin. /* Returns 0 if the skin was not found. See spSkeleton_setSkin.

View File

@ -230,9 +230,9 @@ namespace Spine {
SetSkin(skin); SetSkin(skin);
} }
/// <summary>Sets the skin used to look up attachments not found in the {@link SkeletonData#getDefaultSkin() default skin}. Attachments /// <summary>Sets the skin used to look up attachments before looking in the {@link SkeletonData#getDefaultSkin() default
/// from the new skin are attached if the corresponding attachment from the old skin was attached. If there was no old skin, each slot's /// skin}. Attachmentsfrom the new skin are attached if the corresponding attachment from the old skin was attached. If
/// setup mode attachment is attached from the new skin.</summary> /// there was no old skin, each slot's setup mode attachment is attached from the new skin.</summary>
/// <param name="newSkin">May be null.</param> /// <param name="newSkin">May be null.</param>
public void SetSkin (Skin newSkin) { public void SetSkin (Skin newSkin) {
if (newSkin != null) { if (newSkin != null) {

View File

@ -1139,9 +1139,9 @@ spine.Skeleton.prototype = {
if (!skin) throw "Skin not found: " + skinName; if (!skin) throw "Skin not found: " + skinName;
this.setSkin(skin); this.setSkin(skin);
}, },
/** Sets the skin used to look up attachments not found in the {@link SkeletonData#getDefaultSkin() default skin}. Attachments /** Sets the skin used to look up attachments before looking in the {@link SkeletonData#getDefaultSkin() default skin}.
* from the new skin are attached if the corresponding attachment from the old skin was attached. If there was no old skin, * Attachments from the new skin are attached if the corresponding attachment from the old skin was attached. If there was
* each slot's setup mode attachment is attached from the new skin. * no old skin, each slot's setup mode attachment is attached from the new skin.
* @param newSkin May be null. */ * @param newSkin May be null. */
setSkin: function (newSkin) { setSkin: function (newSkin) {
if (newSkin) { if (newSkin) {

View File

@ -282,9 +282,9 @@ public class Skeleton {
setSkin(skin); setSkin(skin);
} }
/** Sets the skin used to look up attachments not found in the {@link SkeletonData#getDefaultSkin() default skin}. Attachments /** Sets the skin used to look up attachments before looking in the {@link SkeletonData#getDefaultSkin() default skin}.
* from the new skin are attached if the corresponding attachment from the old skin was attached. If there was no old skin, * Attachments from the new skin are attached if the corresponding attachment from the old skin was attached. If there was no
* each slot's setup mode attachment is attached from the new skin. * old skin, each slot's setup mode attachment is attached from the new skin.
* @param newSkin May be null. */ * @param newSkin May be null. */
public void setSkin (Skin newSkin) { public void setSkin (Skin newSkin) {
if (newSkin != null) { if (newSkin != null) {

View File

@ -151,6 +151,9 @@ function Skeleton.new (skeletonData)
return self.slotsByName[slotName] return self.slotsByName[slotName]
end end
-- Sets the skin used to look up attachments before looking in the {@link SkeletonData#getDefaultSkin() default skin}.
-- Attachments from the new skin are attached if the corresponding attachment from the old skin was attached. If there was
-- no old skin, each slot's setup mode attachment is attached from the new skin.
function self:setSkin (skinName) function self:setSkin (skinName)
local newSkin local newSkin
if skinName then if skinName then