Setter for attachment vertices.

This commit is contained in:
NathanSweet 2014-04-08 21:12:36 +02:00
parent f7413f0c3b
commit d3bf1d00bb
2 changed files with 7 additions and 5 deletions

View File

@ -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); return animationToMixTime.get(tempKey, defaultMix);
if (time == Float.MIN_VALUE) return defaultMix;
return time;
} }
public float getDefaultMix () { public float getDefaultMix () {

View File

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