瀏覽代碼

Fixed spineboy script.

NathanSweet 12 年之前
父節點
當前提交
b6bab0b9c2
共有 2 個文件被更改,包括 1 次插入11 次删除
  1. 0 1
      spine-tk2d/Code/tk2dSpineSkeleton.cs
  2. 1 10
      spine-tk2d/Example/Scripts/tk2dSpineboy.cs

+ 0 - 1
spine-tk2d/Code/tk2dSpineSkeleton.cs

@@ -49,7 +49,6 @@ public class tk2dSpineSkeleton : MonoBehaviour, tk2dRuntime.ISpriteCollectionFor
 	}
 	
 	private void Clear() {
-		Debug.Log("clear?!");
 		GetComponent<MeshFilter>().mesh = null;
 		DestroyImmediate(mesh);
 		mesh = null;

+ 1 - 10
spine-tk2d/Example/Scripts/tk2dSpineboy.cs

@@ -4,20 +4,13 @@ using System.Collections;
 /*
  */
 public class tk2dSpineboy : MonoBehaviour {
-	
-	/*
-	 */
 	private tk2dSpineSkeleton skeleton;
 	
-	/*
-	 */
 	void Start() {
 		skeleton = GetComponent<tk2dSpineSkeleton>();
 	}
 	
-	/*
-	 */
-	void Update() {
+	void LateUpdate() {
 		if (skeleton.loop) return;
 		
 		if (skeleton.state.Animation != null && skeleton.state.Time >= skeleton.state.Animation.Duration - 0.25) {
@@ -26,8 +19,6 @@ public class tk2dSpineboy : MonoBehaviour {
 		}
 	}
 	
-	/*
-	 */
 	void OnMouseDown() {
 		skeleton.animationName = "jump";
 		skeleton.loop = false;