mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-14 19:11:36 +08:00
Added FPS for 3.5.00-beta.
This commit is contained in:
parent
cd982be60b
commit
367cf651cf
@ -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;
|
||||
}
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user