mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 23:34:53 +08:00
Added event audio path field.
This commit is contained in:
parent
447cce2f84
commit
b0cf3abd71
@ -37,7 +37,7 @@ public class EventData {
|
||||
final String name;
|
||||
int intValue;
|
||||
float floatValue;
|
||||
String stringValue;
|
||||
String stringValue, audioPath;
|
||||
|
||||
public EventData (String name) {
|
||||
if (name == null) throw new IllegalArgumentException("name cannot be null.");
|
||||
@ -68,6 +68,14 @@ public class EventData {
|
||||
this.stringValue = stringValue;
|
||||
}
|
||||
|
||||
public String getAudioPath () {
|
||||
return audioPath;
|
||||
}
|
||||
|
||||
public void setAudioPath (String audioPath) {
|
||||
this.audioPath = audioPath;
|
||||
}
|
||||
|
||||
/** The name of the event, which is unique within the skeleton. */
|
||||
public String getName () {
|
||||
return name;
|
||||
|
||||
@ -306,6 +306,7 @@ public class SkeletonBinary {
|
||||
data.intValue = input.readInt(false);
|
||||
data.floatValue = input.readFloat();
|
||||
data.stringValue = input.readString();
|
||||
data.audioPath = input.readString();
|
||||
skeletonData.events.add(data);
|
||||
}
|
||||
|
||||
|
||||
@ -292,6 +292,7 @@ public class SkeletonJson {
|
||||
data.intValue = eventMap.getInt("int", 0);
|
||||
data.floatValue = eventMap.getFloat("float", 0f);
|
||||
data.stringValue = eventMap.getString("string", "");
|
||||
data.audioPath = eventMap.getString("audio", "");
|
||||
skeletonData.events.add(data);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user