diff --git a/spine-tk2d/Assets/Spine/SkeletonAnimation.cs b/spine-tk2d/Assets/Spine/SkeletonAnimation.cs index 76ab0bef6..4882086f3 100644 --- a/spine-tk2d/Assets/Spine/SkeletonAnimation.cs +++ b/spine-tk2d/Assets/Spine/SkeletonAnimation.cs @@ -66,12 +66,12 @@ public class SkeletonAnimation : SkeletonComponent { if (_animationName != null && _animationName.Length > 0) state.SetAnimation(0, _animationName, loop); } - override public void UpdateSkeleton () { + override public void UpdateSkeleton (float deltaTime) { // Apply the animation. - state.Update(Time.deltaTime * timeScale); + state.Update(deltaTime * timeScale); state.Apply(skeleton); // Call overridden method to call skeleton Update and UpdateWorldTransform. - base.UpdateSkeleton(); + base.UpdateSkeleton(deltaTime); } } diff --git a/spine-tk2d/Assets/Spine/SkeletonComponent.cs b/spine-tk2d/Assets/Spine/SkeletonComponent.cs index 66acfa8b1..73a6b6b67 100644 --- a/spine-tk2d/Assets/Spine/SkeletonComponent.cs +++ b/spine-tk2d/Assets/Spine/SkeletonComponent.cs @@ -91,8 +91,8 @@ public class SkeletonComponent : MonoBehaviour { return mesh; } - public virtual void UpdateSkeleton () { - skeleton.Update(Time.deltaTime * timeScale); + public virtual void UpdateSkeleton (float deltaTime) { + skeleton.Update(deltaTime * timeScale); skeleton.UpdateWorldTransform(); } @@ -113,7 +113,7 @@ public class SkeletonComponent : MonoBehaviour { if (skeleton == null || skeleton.Data != skeletonData) Initialize(); - UpdateSkeleton(); + UpdateSkeleton(Time.deltaTime); // Count quads and submeshes. int quadCount = 0, submeshQuadCount = 0; diff --git a/spine-unity/Assets/Spine/SkeletonAnimation.cs b/spine-unity/Assets/Spine/SkeletonAnimation.cs index f71735bb3..89f094a85 100644 --- a/spine-unity/Assets/Spine/SkeletonAnimation.cs +++ b/spine-unity/Assets/Spine/SkeletonAnimation.cs @@ -66,12 +66,12 @@ public class SkeletonAnimation : SkeletonComponent { if (_animationName != null && _animationName.Length > 0) state.SetAnimation(0, _animationName, loop); } - override public void UpdateSkeleton () { + override public void UpdateSkeleton (float deltaTime) { // Apply the animation. - state.Update(Time.deltaTime * timeScale); + state.Update(deltaTime * timeScale); state.Apply(skeleton); // Call overridden method to call skeleton Update and UpdateWorldTransform. - base.UpdateSkeleton(); + base.UpdateSkeleton(deltaTime); } } diff --git a/spine-unity/Assets/Spine/SkeletonComponent.cs b/spine-unity/Assets/Spine/SkeletonComponent.cs index 21ee57c12..c6540ce99 100644 --- a/spine-unity/Assets/Spine/SkeletonComponent.cs +++ b/spine-unity/Assets/Spine/SkeletonComponent.cs @@ -90,9 +90,9 @@ public class SkeletonComponent : MonoBehaviour { mesh.MarkDynamic(); return mesh; } - - public virtual void UpdateSkeleton () { - skeleton.Update(Time.deltaTime * timeScale); + + public virtual void UpdateSkeleton (float deltaTime) { + skeleton.Update(deltaTime * timeScale); skeleton.UpdateWorldTransform(); } @@ -113,7 +113,7 @@ public class SkeletonComponent : MonoBehaviour { if (skeleton == null || skeleton.Data != skeletonData) Initialize(); - UpdateSkeleton(); + UpdateSkeleton(Time.deltaTime); // Count quads and submeshes. int quadCount = 0, submeshQuadCount = 0;