Prechádzať zdrojové kódy

Setter for attachment vertices.

NathanSweet 11 rokov pred
rodič
commit
d3bf1d00bb

+ 1 - 3
spine-libgdx/src/com/esotericsoftware/spine/AnimationStateData.java

@@ -65,9 +65,7 @@ public class AnimationStateData {
 	public float getMix (Animation from, Animation to) {
 	public float getMix (Animation from, Animation to) {
 		tempKey.a1 = from;
 		tempKey.a1 = from;
 		tempKey.a2 = to;
 		tempKey.a2 = to;
-		float time = animationToMixTime.get(tempKey, Float.MIN_VALUE);
-		if (time == Float.MIN_VALUE) return defaultMix;
-		return time;
+		return animationToMixTime.get(tempKey, defaultMix);
 	}
 	}
 
 
 	public float getDefaultMix () {
 	public float getDefaultMix () {

+ 6 - 2
spine-libgdx/src/com/esotericsoftware/spine/Slot.java

@@ -40,7 +40,7 @@ public class Slot {
 	final Color color;
 	final Color color;
 	Attachment attachment;
 	Attachment attachment;
 	private float attachmentTime;
 	private float attachmentTime;
-	private final FloatArray attachmentVertices = new FloatArray();
+	private FloatArray attachmentVertices = new FloatArray();
 
 
 	Slot () {
 	Slot () {
 		data = null;
 		data = null;
@@ -100,7 +100,7 @@ public class Slot {
 		if (this.attachment == attachment) return;
 		if (this.attachment == attachment) return;
 		this.attachment = attachment;
 		this.attachment = attachment;
 		attachmentTime = skeleton.time;
 		attachmentTime = skeleton.time;
-		//attachmentVertices.clear();
+		// attachmentVertices.clear();
 	}
 	}
 
 
 	public void setAttachmentTime (float time) {
 	public void setAttachmentTime (float time) {
@@ -112,6 +112,10 @@ public class Slot {
 		return skeleton.time - attachmentTime;
 		return skeleton.time - attachmentTime;
 	}
 	}
 
 
+	public void setAttachmentVertices (FloatArray attachmentVertices) {
+		this.attachmentVertices = attachmentVertices;
+	}
+
 	public FloatArray getAttachmentVertices () {
 	public FloatArray getAttachmentVertices () {
 		return attachmentVertices;
 		return attachmentVertices;
 	}
 	}