Added FPS for 3.5.00-beta.

This commit is contained in:
NathanSweet 2016-09-17 09:24:34 +02:00
parent cd982be60b
commit 367cf651cf
3 changed files with 15 additions and 1 deletions

View File

@ -170,6 +170,7 @@ public class SkeletonBinary {
boolean nonessential = input.readBoolean();
if (nonessential) {
skeletonData.fps = input.readFloat();
skeletonData.imagesPath = input.readString();
if (skeletonData.imagesPath.isEmpty()) skeletonData.imagesPath = null;
}

View File

@ -45,7 +45,11 @@ public class SkeletonData {
final Array<TransformConstraintData> transformConstraints = new Array();
final Array<PathConstraintData> pathConstraints = new Array();
float width, height;
String version, hash, imagesPath;
String version, hash;
// Nonessential.
float fps;
String imagesPath;
// --- Bones.
@ -273,6 +277,14 @@ public class SkeletonData {
this.imagesPath = imagesPath;
}
public float getFps () {
return fps;
}
public void setFps (float fps) {
this.fps = fps;
}
public String toString () {
return name != null ? name : super.toString();
}

View File

@ -110,6 +110,7 @@ public class SkeletonJson {
skeletonData.version = skeletonMap.getString("spine", null);
skeletonData.width = skeletonMap.getFloat("width", 0);
skeletonData.height = skeletonMap.getFloat("height", 0);
skeletonData.fps = skeletonMap.getFloat("fps", 0);
skeletonData.imagesPath = skeletonMap.getString("images", null);
}