setSkin method
void
setSkin(
- Skin? newSkin
inherited
Implementation
void setSkin(Skin? newSkin) {
if (newSkin != null) {
if (skin != null) {
newSkin.attachAll(this, skin);
} else {
final List<Slot> slots = this.slots;
final int n = slots.length;
for (int i = 0; i < n; i++) {
final Slot slot = slots[i];
final String? name = slot.data.attachmentName;
if (name != null) {
final Attachment? attachment = newSkin.getAttachment(i, name);
if (attachment != null) slot.setAttachment(attachment);
}
}
}
}
skin = newSkin;
}