ソースを参照

Sequence clean up.

* Removed unused generics.
* Sequence missing from copy constructors.
* Renamed stop->hold.
Nathan Sweet 4 年 前
コミット
34870fd759

+ 2 - 2
spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Animation.java

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

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

@@ -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) {

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

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

+ 1 - 1
spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/Sequence.java

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