mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[libgdx] Added audio path to SkeletonData.
This commit is contained in:
parent
283f63b466
commit
2621a75e46
@ -182,8 +182,12 @@ public class SkeletonBinary {
|
|||||||
|
|
||||||
if (nonessential) {
|
if (nonessential) {
|
||||||
skeletonData.fps = input.readFloat();
|
skeletonData.fps = input.readFloat();
|
||||||
|
|
||||||
skeletonData.imagesPath = input.readString();
|
skeletonData.imagesPath = input.readString();
|
||||||
if (skeletonData.imagesPath.isEmpty()) skeletonData.imagesPath = null;
|
if (skeletonData.imagesPath.isEmpty()) skeletonData.imagesPath = null;
|
||||||
|
|
||||||
|
skeletonData.audioPath = input.readString();
|
||||||
|
if (skeletonData.audioPath.isEmpty()) skeletonData.audioPath = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bones.
|
// Bones.
|
||||||
|
|||||||
@ -52,7 +52,7 @@ public class SkeletonData {
|
|||||||
|
|
||||||
// Nonessential.
|
// Nonessential.
|
||||||
float fps = 30;
|
float fps = 30;
|
||||||
String imagesPath;
|
String imagesPath, audioPath;
|
||||||
|
|
||||||
// --- Bones.
|
// --- Bones.
|
||||||
|
|
||||||
@ -273,7 +273,7 @@ public class SkeletonData {
|
|||||||
this.hash = hash;
|
this.hash = hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** The path to the image directory as defined in Spine. Available only when nonessential data was exported.
|
/** The path to the images directory as defined in Spine. Available only when nonessential data was exported.
|
||||||
* @return May be null. */
|
* @return May be null. */
|
||||||
public String getImagesPath () {
|
public String getImagesPath () {
|
||||||
return imagesPath;
|
return imagesPath;
|
||||||
@ -284,6 +284,17 @@ public class SkeletonData {
|
|||||||
this.imagesPath = imagesPath;
|
this.imagesPath = imagesPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** The path to the audio directory as defined in Spine. Available only when nonessential data was exported.
|
||||||
|
* @return May be null. */
|
||||||
|
public String getAudioPath () {
|
||||||
|
return audioPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @param audioPath May be null. */
|
||||||
|
public void setAudioPath (String audioPath) {
|
||||||
|
this.audioPath = audioPath;
|
||||||
|
}
|
||||||
|
|
||||||
/** The dopesheet FPS in Spine. Available only when nonessential data was exported. */
|
/** The dopesheet FPS in Spine. Available only when nonessential data was exported. */
|
||||||
public float getFps () {
|
public float getFps () {
|
||||||
return fps;
|
return fps;
|
||||||
|
|||||||
@ -122,6 +122,7 @@ public class SkeletonJson {
|
|||||||
skeletonData.height = skeletonMap.getFloat("height", 0);
|
skeletonData.height = skeletonMap.getFloat("height", 0);
|
||||||
skeletonData.fps = skeletonMap.getFloat("fps", 30);
|
skeletonData.fps = skeletonMap.getFloat("fps", 30);
|
||||||
skeletonData.imagesPath = skeletonMap.getString("images", null);
|
skeletonData.imagesPath = skeletonMap.getString("images", null);
|
||||||
|
skeletonData.audioPath = skeletonMap.getString("audio", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bones.
|
// Bones.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user