AttachmentType type = AttachmentType.valueOf(map.getString("type", AttachmentType.region.name()));
Attachment attachment = attachmentLoader.newAttachment(skin, type, name);
if (attachment instanceof RegionSequenceAttachment) {
RegionSequenceAttachment regionSequenceAttachment = (RegionSequenceAttachment)attachment;
float fps = map.getFloat("fps");
regionSequenceAttachment.setFrameTime(fps);
String modeString = map.getString("mode");
regionSequenceAttachment.setMode(modeString == null ? Mode.forward : Mode.valueOf(modeString));
}
if (attachment instanceof RegionAttachment) {
RegionAttachment regionAttachment = (RegionAttachment)attachment;
regionAttachment.setX(map.getFloat("x", 0) * scale);