Răsfoiți Sursa

timeScale can't be negative.

NathanSweet 11 ani în urmă
părinte
comite
f597ad5d6a

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

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

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

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