@@ -715,7 +715,7 @@ namespace Ichni.Editor
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Animation Swaps (动画值交换)
|
||||
#region Animation (动画值)
|
||||
/// <summary>
|
||||
/// 交换 Displacement 动画值的正负号
|
||||
/// </summary>
|
||||
@@ -799,6 +799,32 @@ namespace Ichni.Editor
|
||||
anim.startValue = -anim.startValue;
|
||||
}
|
||||
}
|
||||
|
||||
// public static void randomAnimationValue(float range)
|
||||
// {
|
||||
// AnimationBase animationBase = inspector.connectedGameElement as AnimationBase;
|
||||
// if (animationBase == null)
|
||||
// {
|
||||
// LogWindow.Log("Please select a AnimationBase first!", Color.red);
|
||||
// return;
|
||||
// }
|
||||
// System.Random random = new System.Random();
|
||||
// foreach (var property in animationBase.GetType().GetProperties())
|
||||
// {
|
||||
// if (property.PropertyType == typeof(FlexibleFloat))
|
||||
// {
|
||||
// FlexibleFloat ff = property.GetValue(animationBase) as FlexibleFloat;
|
||||
// if (ff != null)
|
||||
// {
|
||||
// foreach (var anim in ff.animations)
|
||||
// {
|
||||
// float randomOffset = (float)(random.NextDouble() * 2 - 1) * range;
|
||||
// anim.endValue += randomOffset;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
#endregion
|
||||
|
||||
#region Global Utilities (全局工具)
|
||||
|
||||
Reference in New Issue
Block a user