Added event audio path field.

This commit is contained in:
NathanSweet 2017-06-25 02:07:34 +02:00
parent 447cce2f84
commit b0cf3abd71
3 changed files with 11 additions and 1 deletions

View File

@ -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;

View File

@ -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);
}

View File

@ -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);
}