private Attachment readAttachment (DataInput input, Skin skin, String attachmentName) throws IOException {
String name = input.readString();
if (name == null) name = attachmentName;
AttachmentType type = AttachmentType.values()[input.readByte()];
Attachment attachment = attachmentLoader.newAttachment(skin, type, name);
if (attachment instanceof RegionSequenceAttachment) {
RegionSequenceAttachment regionSequenceAttachment = (RegionSequenceAttachment)attachment;
regionSequenceAttachment.setFrameTime(1 / input.readFloat());