Ver código fonte

Left some code commented out for easier AnimationState testing.

NathanSweet 8 anos atrás
pai
commit
b75a3ddecb

+ 12 - 0
spine-libgdx/spine-skeletonviewer/src/com/esotericsoftware/spine/SkeletonViewer.java

@@ -216,6 +216,18 @@ public class SkeletonViewer extends ApplicationAdapter {
 
 		if (ui.skinList.getSelected() != null) skeleton.setSkin(ui.skinList.getSelected());
 		setAnimation();
+
+		// ui.animationList.clearListeners();
+		// state.addListener(new AnimationState.AnimationStateAdapter() {
+		// public void complete (TrackEntry entry) {
+		// System.out.println("complete " + entry + ", " + entry.hashCode());
+		// System.out.println("complete " + entry + ", " + entry.hashCode());
+		// state.setAnimation(0, Math.random() > 0.5? "walk" : "jump", false);
+		// state.update(0);
+		// state.apply(skeleton);
+		// }
+		// });
+		// state.setAnimation(0, "walk", true);
 	}
 
 	void setAnimation () {