Fixed timeScale bug. Added timeScale to inspector.

This commit is contained in:
NathanSweet 2014-05-08 12:11:26 +02:00
parent cc89e1a3a6
commit 9c403565e0
4 changed files with 4 additions and 2 deletions

View File

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

View File

@ -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();

View File

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

View File

@ -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();