mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[libgdx] parseRoot -> parseValue.
This commit is contained in:
parent
3dad8462a3
commit
18dfa3b634
@ -138,7 +138,7 @@ public class SkeletonJson extends SkeletonLoader {
|
|||||||
public SkeletonData readSkeletonData (FileHandle file) {
|
public SkeletonData readSkeletonData (FileHandle file) {
|
||||||
if (file == null) throw new IllegalArgumentException("file cannot be null.");
|
if (file == null) throw new IllegalArgumentException("file cannot be null.");
|
||||||
try {
|
try {
|
||||||
SkeletonData skeletonData = readSkeletonData(parser.parseRoot(file));
|
SkeletonData skeletonData = readSkeletonData(parser.parseValue(file));
|
||||||
skeletonData.name = file.nameWithoutExtension();
|
skeletonData.name = file.nameWithoutExtension();
|
||||||
return skeletonData;
|
return skeletonData;
|
||||||
} catch (Throwable ex) {
|
} catch (Throwable ex) {
|
||||||
@ -149,7 +149,7 @@ public class SkeletonJson extends SkeletonLoader {
|
|||||||
public SkeletonData readSkeletonData (InputStream input) {
|
public SkeletonData readSkeletonData (InputStream input) {
|
||||||
if (input == null) throw new IllegalArgumentException("dataInput cannot be null.");
|
if (input == null) throw new IllegalArgumentException("dataInput cannot be null.");
|
||||||
try {
|
try {
|
||||||
return readSkeletonData(parser.parseRoot(input));
|
return readSkeletonData(parser.parseValue(input));
|
||||||
} catch (Throwable ex) {
|
} catch (Throwable ex) {
|
||||||
throw new SerializationException("Error reading JSON skeleton data.", ex);
|
throw new SerializationException("Error reading JSON skeleton data.", ex);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user