mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Setter for attachment vertices.
This commit is contained in:
parent
f7413f0c3b
commit
d3bf1d00bb
@ -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 () {
|
||||||
|
|||||||
@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user