From b6bab0b9c22da347a8e4b2d62e58e7722a572b1b Mon Sep 17 00:00:00 2001 From: NathanSweet Date: Thu, 30 May 2013 03:01:50 +0200 Subject: [PATCH] Fixed spineboy script. --- spine-tk2d/Code/tk2dSpineSkeleton.cs | 1 - spine-tk2d/Example/Scripts/tk2dSpineboy.cs | 11 +---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/spine-tk2d/Code/tk2dSpineSkeleton.cs b/spine-tk2d/Code/tk2dSpineSkeleton.cs index a9b383920..4fe3c23ae 100644 --- a/spine-tk2d/Code/tk2dSpineSkeleton.cs +++ b/spine-tk2d/Code/tk2dSpineSkeleton.cs @@ -49,7 +49,6 @@ public class tk2dSpineSkeleton : MonoBehaviour, tk2dRuntime.ISpriteCollectionFor } private void Clear() { - Debug.Log("clear?!"); GetComponent().mesh = null; DestroyImmediate(mesh); mesh = null; diff --git a/spine-tk2d/Example/Scripts/tk2dSpineboy.cs b/spine-tk2d/Example/Scripts/tk2dSpineboy.cs index ce53301af..d7f22caa5 100644 --- a/spine-tk2d/Example/Scripts/tk2dSpineboy.cs +++ b/spine-tk2d/Example/Scripts/tk2dSpineboy.cs @@ -4,20 +4,13 @@ using System.Collections; /* */ public class tk2dSpineboy : MonoBehaviour { - - /* - */ private tk2dSpineSkeleton skeleton; - /* - */ void Start() { skeleton = GetComponent(); } - /* - */ - 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;