thx. for your answer..
but i can't understand correctly..
below code is for cocos2d-x
there is no way, because it is only skied if attachmentName is null
i know slot name, but i'can do anything..
could you tell me more information..
thx..
int Skeleton_setAttachment (Skeleton* self, const char* slotName, const char* attachmentName) {
int i;
for (i = 0; i < self->slotCount; ++i) {
Slot *slot = self->slots[i];
if (strcmp(slot->data->name, slotName) == 0) {
Attachment* attachment = Skeleton_getAttachmentForSlotIndex(self, i, attachmentName);
if (!attachment) return 0;
Slot_setAttachment(slot, attachment);
return 1;
}
}
return 0;
}