mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-15 03:21:35 +08:00
Added images path to nonessential data.
This commit is contained in:
parent
1c4712aeb4
commit
5f8dd415a5
@ -113,6 +113,12 @@ public class SkeletonBinary {
|
||||
skeletonData.height = input.readFloat();
|
||||
|
||||
boolean nonessential = input.readBoolean();
|
||||
|
||||
if (nonessential) {
|
||||
String imagesPath = input.readString();
|
||||
if (imagesPath.length() > 0) skeletonData.imagesPath = imagesPath;
|
||||
}
|
||||
|
||||
// Bones.
|
||||
for (int i = 0, n = input.readInt(true); i < n; i++) {
|
||||
String name = input.readString();
|
||||
|
||||
@ -42,7 +42,7 @@ public class SkeletonData {
|
||||
final Array<Animation> animations = new Array();
|
||||
final Array<IkConstraintData> ikConstraints = new Array();
|
||||
float width, height;
|
||||
String version, hash;
|
||||
String version, hash, imagesPath;
|
||||
|
||||
// --- Bones.
|
||||
|
||||
@ -197,23 +197,36 @@ public class SkeletonData {
|
||||
this.height = height;
|
||||
}
|
||||
|
||||
/** Returns the Spine version used to export this data. */
|
||||
/** Returns the Spine version used to export this data, or null. */
|
||||
public String getVersion () {
|
||||
return version;
|
||||
}
|
||||
|
||||
/** @param version May be null. */
|
||||
public void setVersion (String version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
/** @return May be null. */
|
||||
public String getHash () {
|
||||
return hash;
|
||||
}
|
||||
|
||||
/** @param hash May be null. */
|
||||
public void setHash (String hash) {
|
||||
this.hash = hash;
|
||||
}
|
||||
|
||||
/** @return May be null. */
|
||||
public String getImagesPath () {
|
||||
return imagesPath;
|
||||
}
|
||||
|
||||
/** @param imagesPath May be null. */
|
||||
public void setImagesPath (String imagesPath) {
|
||||
this.imagesPath = imagesPath;
|
||||
}
|
||||
|
||||
public String toString () {
|
||||
return name != null ? name : super.toString();
|
||||
}
|
||||
|
||||
@ -99,6 +99,7 @@ public class SkeletonJson {
|
||||
skeletonData.version = skeletonMap.getString("spine");
|
||||
skeletonData.width = skeletonMap.getFloat("width");
|
||||
skeletonData.height = skeletonMap.getFloat("height");
|
||||
skeletonData.imagesPath = skeletonMap.getString("images", null);
|
||||
}
|
||||
|
||||
// Bones.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user