浏览代码

Fixed timeScale bug. Added timeScale to inspector.

NathanSweet 11 年之前
父节点
当前提交
9c403565e0

+ 1 - 0
spine-tk2d/Assets/Spine/Editor/SkeletonAnimationInspector.cs

@@ -72,5 +72,6 @@ public class SkeletonAnimationInspector : SkeletonRendererInspector {
 		}
 		}
 
 
 		EditorGUILayout.PropertyField(loop);
 		EditorGUILayout.PropertyField(loop);
+		EditorGUILayout.PropertyField(timeScale);
 	}
 	}
 }
 }

+ 1 - 1
spine-tk2d/Assets/Spine/SkeletonAnimation.cs

@@ -81,7 +81,7 @@ public class SkeletonAnimation : SkeletonRenderer {
 
 
 		deltaTime *= timeScale;
 		deltaTime *= timeScale;
 		skeleton.Update(deltaTime);
 		skeleton.Update(deltaTime);
-		state.Update(deltaTime * timeScale);
+		state.Update(deltaTime);
 		state.Apply(skeleton);
 		state.Apply(skeleton);
 		if (UpdateBones != null) UpdateBones(this);
 		if (UpdateBones != null) UpdateBones(this);
 		skeleton.UpdateWorldTransform();
 		skeleton.UpdateWorldTransform();

+ 1 - 0
spine-unity/Assets/Spine/Editor/SkeletonAnimationInspector.cs

@@ -72,5 +72,6 @@ public class SkeletonAnimationInspector : SkeletonRendererInspector {
 		}
 		}
 
 
 		EditorGUILayout.PropertyField(loop);
 		EditorGUILayout.PropertyField(loop);
+		EditorGUILayout.PropertyField(timeScale);
 	}
 	}
 }
 }

+ 1 - 1
spine-unity/Assets/Spine/SkeletonAnimation.cs

@@ -81,7 +81,7 @@ public class SkeletonAnimation : SkeletonRenderer {
 
 
 		deltaTime *= timeScale;
 		deltaTime *= timeScale;
 		skeleton.Update(deltaTime);
 		skeleton.Update(deltaTime);
-		state.Update(deltaTime * timeScale);
+		state.Update(deltaTime);
 		state.Apply(skeleton);
 		state.Apply(skeleton);
 		if (UpdateBones != null) UpdateBones(this);
 		if (UpdateBones != null) UpdateBones(this);
 		skeleton.UpdateWorldTransform();
 		skeleton.UpdateWorldTransform();