mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
[libgdx] Allow JsonReader to be customized.
This commit is contained in:
parent
21794a758c
commit
7ed3589225
@ -103,6 +103,10 @@ public class SkeletonJson {
|
||||
this.scale = scale;
|
||||
}
|
||||
|
||||
protected JsonValue parse (FileHandle file) {
|
||||
return new JsonReader().parse(file);
|
||||
}
|
||||
|
||||
public SkeletonData readSkeletonData (FileHandle file) {
|
||||
if (file == null) throw new IllegalArgumentException("file cannot be null.");
|
||||
|
||||
@ -111,7 +115,7 @@ public class SkeletonJson {
|
||||
SkeletonData skeletonData = new SkeletonData();
|
||||
skeletonData.name = file.nameWithoutExtension();
|
||||
|
||||
JsonValue root = new JsonReader().parse(file);
|
||||
JsonValue root = parse(file);
|
||||
|
||||
// Skeleton.
|
||||
JsonValue skeletonMap = root.get("skeleton");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user