Fixed clearing tracks in event callbacks.

This commit is contained in:
NathanSweet 2013-10-10 18:49:16 +02:00
parent 26832677cb
commit f3be613429
3 changed files with 6 additions and 4 deletions

View File

@ -91,7 +91,7 @@ namespace Spine {
public void Apply (Skeleton skeleton) {
List<Event> events = this.events;
for (int i = 0, n = tracks.Count; i < n; i++) {
for (int i = 0; i < tracks.Count; i++) {
TrackEntry current = tracks[i];
if (current == null) continue;
@ -305,5 +305,9 @@ namespace Spine {
internal void OnComplete (AnimationState state, int index, int loopCount) {
if (Complete != null) Complete(state, new CompleteArgs(index, loopCount));
}
override public String ToString () {
return animation == null ? "<none>" : animation.name;
}
}
}

View File

@ -88,7 +88,7 @@ public class AnimationState {
Array<Event> events = this.events;
int listenerCount = listeners.size;
for (int i = 0, n = tracks.size; i < n; i++) {
for (int i = 0; i < tracks.size; i++) {
TrackEntry current = tracks.get(i);
if (current == null) continue;

View File

@ -33,8 +33,6 @@
package com.esotericsoftware.spine;
// BOZO - Event values don't seem to key properly.
import com.esotericsoftware.spine.Animation.AttachmentTimeline;
import com.esotericsoftware.spine.Animation.ColorTimeline;
import com.esotericsoftware.spine.Animation.CurveTimeline;