|
@@ -37,6 +37,7 @@ import com.badlogic.gdx.utils.IntArray;
|
|
import com.badlogic.gdx.utils.IntSet;
|
|
import com.badlogic.gdx.utils.IntSet;
|
|
import com.badlogic.gdx.utils.Pool;
|
|
import com.badlogic.gdx.utils.Pool;
|
|
import com.badlogic.gdx.utils.Pool.Poolable;
|
|
import com.badlogic.gdx.utils.Pool.Poolable;
|
|
|
|
+
|
|
import com.esotericsoftware.spine.Animation.AttachmentTimeline;
|
|
import com.esotericsoftware.spine.Animation.AttachmentTimeline;
|
|
import com.esotericsoftware.spine.Animation.DrawOrderTimeline;
|
|
import com.esotericsoftware.spine.Animation.DrawOrderTimeline;
|
|
import com.esotericsoftware.spine.Animation.EventTimeline;
|
|
import com.esotericsoftware.spine.Animation.EventTimeline;
|
|
@@ -745,11 +746,11 @@ public class AnimationState {
|
|
if (!propertyIDs.add(id))
|
|
if (!propertyIDs.add(id))
|
|
timelineMode[i] = SUBSEQUENT;
|
|
timelineMode[i] = SUBSEQUENT;
|
|
else if (to == null || timeline instanceof AttachmentTimeline || timeline instanceof DrawOrderTimeline
|
|
else if (to == null || timeline instanceof AttachmentTimeline || timeline instanceof DrawOrderTimeline
|
|
- || timeline instanceof EventTimeline || !hasTimeline(to, id)) {
|
|
|
|
|
|
+ || timeline instanceof EventTimeline || !to.animation.hasTimeline(id)) {
|
|
timelineMode[i] = FIRST;
|
|
timelineMode[i] = FIRST;
|
|
} else {
|
|
} else {
|
|
for (TrackEntry next = to.mixingTo; next != null; next = next.mixingTo) {
|
|
for (TrackEntry next = to.mixingTo; next != null; next = next.mixingTo) {
|
|
- if (hasTimeline(next, id)) continue;
|
|
|
|
|
|
+ if (next.animation.hasTimeline(id)) continue;
|
|
if (next.mixDuration > 0) {
|
|
if (next.mixDuration > 0) {
|
|
timelineMode[i] = HOLD_MIX;
|
|
timelineMode[i] = HOLD_MIX;
|
|
timelineHoldMix[i] = next;
|
|
timelineHoldMix[i] = next;
|
|
@@ -776,13 +777,6 @@ public class AnimationState {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- private boolean hasTimeline (TrackEntry entry, int id) {
|
|
|
|
- Object[] timelines = entry.animation.timelines.items;
|
|
|
|
- for (int i = 0, n = entry.animation.timelines.size; i < n; i++)
|
|
|
|
- if (((Timeline)timelines[i]).getPropertyId() == id) return true;
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
/** Returns the track entry for the animation currently playing on the track, or null if no animation is currently playing. */
|
|
/** Returns the track entry for the animation currently playing on the track, or null if no animation is currently playing. */
|
|
public TrackEntry getCurrent (int trackIndex) {
|
|
public TrackEntry getCurrent (int trackIndex) {
|
|
if (trackIndex < 0) throw new IllegalArgumentException("trackIndex must be >= 0.");
|
|
if (trackIndex < 0) throw new IllegalArgumentException("trackIndex must be >= 0.");
|