Package com.badlogic.gdx.utils

Examples of com.badlogic.gdx.utils.DataInput.readString()


    DataInput input = new DataInput(file.read(512));
    try {
      // Bones.
      for (int i = 0, n = input.readInt(true); i < n; i++) {
        String name = input.readString();
        BoneData parent = null;
        String parentName = input.readString();
        if (parentName != null) {
          parent = skeletonData.findBone(parentName);
          if (parent == null) throw new SerializationException("Parent bone not found: " + parentName);
View Full Code Here


    try {
      // Bones.
      for (int i = 0, n = input.readInt(true); i < n; i++) {
        String name = input.readString();
        BoneData parent = null;
        String parentName = input.readString();
        if (parentName != null) {
          parent = skeletonData.findBone(parentName);
          if (parent == null) throw new SerializationException("Parent bone not found: " + parentName);
        }
        BoneData boneData = new BoneData(name, parent);
View Full Code Here

        skeletonData.addBone(boneData);
      }

      // Slots.
      for (int i = 0, n = input.readInt(true); i < n; i++) {
        String slotName = input.readString();
        String boneName = input.readString();
        BoneData boneData = skeletonData.findBone(boneName);
        if (boneData == null) throw new SerializationException("Bone not found: " + boneName);
        SlotData slotData = new SlotData(slotName, boneData);
        Color.rgba8888ToColor(slotData.getColor(), input.readInt());
View Full Code Here

      }

      // Slots.
      for (int i = 0, n = input.readInt(true); i < n; i++) {
        String slotName = input.readString();
        String boneName = input.readString();
        BoneData boneData = skeletonData.findBone(boneName);
        if (boneData == null) throw new SerializationException("Bone not found: " + boneName);
        SlotData slotData = new SlotData(slotName, boneData);
        Color.rgba8888ToColor(slotData.getColor(), input.readInt());
        slotData.setAttachmentName(input.readString());
View Full Code Here

        String boneName = input.readString();
        BoneData boneData = skeletonData.findBone(boneName);
        if (boneData == null) throw new SerializationException("Bone not found: " + boneName);
        SlotData slotData = new SlotData(slotName, boneData);
        Color.rgba8888ToColor(slotData.getColor(), input.readInt());
        slotData.setAttachmentName(input.readString());
        slotData.additiveBlending = input.readByte() == 1;
        skeletonData.addSlot(slotData);
      }

      // Default skin.
View Full Code Here

        skeletonData.addSkin(defaultSkin);
      }

      // Skins.
      for (int i = 0, n = input.readInt(true); i < n; i++)
        skeletonData.addSkin(readSkin(input, input.readString()));

      // Animations.
      for (int i = 0, n = input.readInt(true); i < n; i++)
        readAnimation(input.readString(), input, skeletonData);
View Full Code Here

      for (int i = 0, n = input.readInt(true); i < n; i++)
        skeletonData.addSkin(readSkin(input, input.readString()));

      // Animations.
      for (int i = 0, n = input.readInt(true); i < n; i++)
        readAnimation(input.readString(), input, skeletonData);

    } catch (IOException ex) {
      throw new SerializationException("Error reading skeleton file.", ex);
    } finally {
      try {
View Full Code Here

    SkeletonData skeletonData = new SkeletonData();
    skeletonData.name = file.nameWithoutExtension();

    DataInput input = new DataInput(file.read(512));
    try {
      skeletonData.hash = input.readString();
      if (skeletonData.hash.isEmpty()) skeletonData.hash = null;
      skeletonData.version = input.readString();
      if (skeletonData.version.isEmpty()) skeletonData.version = null;
      skeletonData.width = input.readFloat();
      skeletonData.height = input.readFloat();
View Full Code Here

    DataInput input = new DataInput(file.read(512));
    try {
      skeletonData.hash = input.readString();
      if (skeletonData.hash.isEmpty()) skeletonData.hash = null;
      skeletonData.version = input.readString();
      if (skeletonData.version.isEmpty()) skeletonData.version = null;
      skeletonData.width = input.readFloat();
      skeletonData.height = input.readFloat();

      boolean nonessential = input.readBoolean();
View Full Code Here

      skeletonData.height = input.readFloat();

      boolean nonessential = input.readBoolean();

      if (nonessential) {
        skeletonData.imagesPath = input.readString();
        if (skeletonData.imagesPath.isEmpty()) skeletonData.imagesPath = null;
      }

      // Bones.
      for (int i = 0, n = input.readInt(true); i < n; i++) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.