瀏覽代碼

Merge remote-tracking branch 'upstream/master'

smaren 11 年之前
父節點
當前提交
2a8327d6b1

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

@@ -72,5 +72,7 @@ public class SkeletonAnimationInspector : SkeletonRendererInspector {
 		}
 
 		EditorGUILayout.PropertyField(loop);
+		EditorGUILayout.PropertyField(timeScale);
+		component.timeScale = Math.Max(component.timeScale, 0);
 	}
 }

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

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

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

@@ -72,5 +72,7 @@ public class SkeletonAnimationInspector : SkeletonRendererInspector {
 		}
 
 		EditorGUILayout.PropertyField(loop);
+		EditorGUILayout.PropertyField(timeScale);
+		component.timeScale = Math.Max(component.timeScale, 0);
 	}
 }

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

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