Package com.esotericsoftware.spine.attachments

Examples of com.esotericsoftware.spine.attachments.RegionSequenceAttachment


    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());
      regionSequenceAttachment.setMode(Mode.values()[input.readInt(true)]);
    }

    if (attachment instanceof RegionAttachment) {
      RegionAttachment regionAttachment = (RegionAttachment)attachment;
      regionAttachment.setX(input.readFloat() * scale);
 
View Full Code Here


    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);
 
View Full Code Here

TOP

Related Classes of com.esotericsoftware.spine.attachments.RegionSequenceAttachment

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.