Browse Source

Fixed clearing tracks in event callbacks.

NathanSweet 12 years ago
parent
commit
f3be613429

+ 5 - 1
spine-csharp/src/AnimationState.cs

@@ -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;
+		}
 	}
 }

+ 1 - 1
spine-libgdx/src/com/esotericsoftware/spine/AnimationState.java

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

+ 0 - 2
spine-libgdx/src/com/esotericsoftware/spine/SkeletonJson.java

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