Browse Source

Added event audio path field.

NathanSweet 8 years ago
parent
commit
b0cf3abd71

+ 9 - 1
spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/EventData.java

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

+ 1 - 0
spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonBinary.java

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

+ 1 - 0
spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonJson.java

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