mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-09 16:48:43 +08:00
Sequence clean up.
* Removed unused generics. * Sequence missing from copy constructors. * Renamed stop->hold.
This commit is contained in:
parent
b1305cf9b0
commit
34870fd759
@ -2432,7 +2432,7 @@ public class Animation {
|
||||
final int slotIndex;
|
||||
final HasTextureRegion attachment;
|
||||
|
||||
public <T extends Attachment & HasTextureRegion> SequenceTimeline (int frameCount, int slotIndex, Attachment attachment) {
|
||||
public SequenceTimeline (int frameCount, int slotIndex, Attachment attachment) {
|
||||
super(frameCount,
|
||||
Property.sequence.ordinal() + "|" + slotIndex + "|" + ((HasTextureRegion)attachment).getSequence().getId());
|
||||
this.slotIndex = slotIndex;
|
||||
@ -2485,7 +2485,7 @@ public class Animation {
|
||||
|
||||
int index = modeAndIndex >> 4, count = attachment.getSequence().getRegions().length;
|
||||
SequenceMode mode = SequenceMode.values[modeAndIndex & 0xf];
|
||||
if (mode != SequenceMode.stop) {
|
||||
if (mode != SequenceMode.hold) {
|
||||
index += (time - before) / delay + 0.00001f;
|
||||
switch (mode) {
|
||||
case once:
|
||||
|
||||
@ -80,6 +80,7 @@ public class MeshAttachment extends VertexAttachment implements HasTextureRegion
|
||||
arraycopy(other.triangles, 0, triangles, 0, triangles.length);
|
||||
|
||||
hullLength = other.hullLength;
|
||||
sequence = new Sequence(sequence);
|
||||
|
||||
// Nonessential.
|
||||
if (other.edges != null) {
|
||||
|
||||
@ -75,6 +75,7 @@ public class RegionAttachment extends Attachment implements HasTextureRegion {
|
||||
arraycopy(other.uvs, 0, uvs, 0, 8);
|
||||
arraycopy(other.offset, 0, offset, 0, 8);
|
||||
color.set(other.color);
|
||||
sequence = new Sequence(sequence);
|
||||
}
|
||||
|
||||
/** Calculates the {@link #offset} and {@link #uvs} using the {@link #region} and the attachment's transform. Must be called if
|
||||
|
||||
@ -115,7 +115,7 @@ public class Sequence {
|
||||
}
|
||||
|
||||
static public enum SequenceMode {
|
||||
stop, once, loop, pingpong, onceReverse, loopReverse, pingpongReverse;
|
||||
hold, once, loop, pingpong, onceReverse, loopReverse, pingpongReverse;
|
||||
|
||||
static public final SequenceMode[] values = values();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user