From 52c64d97f9b00252e7f2fa93c7cf12e8961b85d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ha=C3=AF=7E?= Date: Wed, 3 Jul 2024 12:55:13 +0200 Subject: [PATCH] Add AacFlState.WithMotionTime to replace AacFlState.MotionTime: - Add AacFlState.WithMotionTime(...) to replace AacFlState.MotionTime() - This is more in line with the function naming convention. --- .../V1/Editor/AacFlStates.cs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Packages/dev.hai-vr.animator-as-code.v1/V1/Editor/AacFlStates.cs b/Packages/dev.hai-vr.animator-as-code.v1/V1/Editor/AacFlStates.cs index 59ce1fd..6babe74 100644 --- a/Packages/dev.hai-vr.animator-as-code.v1/V1/Editor/AacFlStates.cs +++ b/Packages/dev.hai-vr.animator-as-code.v1/V1/Editor/AacFlStates.cs @@ -445,10 +445,19 @@ namespace AnimatorAsCode.V1 return this; } - // FIXME API: Shouldn't there be a WithMotionTimeSetTo? - // FIXME API inconsistency: Shouldn't this also be called WithMotionTime? - /// Set the Motion Time to a parameter. This was formerly known as Normalized Time. + /// Obsolete. Use `WithMotionTime()` instead.
+ /// Set the Motion Time to a parameter. This was formerly known as Normalized Time.
+ ///
+ /// This function is preserved for compatibility.
+ /// The behaviour is identical to `WithMotionTime()`. + [Obsolete("This function was renamed to WithMotionTime(AacFlFloatParameter)")] public AacFlState MotionTime(AacFlFloatParameter floatParam) + { + return WithMotionTime(floatParam); + } + + /// Set the Motion Time to a parameter. This was formerly known as Normalized Time. + public AacFlState WithMotionTime(AacFlFloatParameter floatParam) { State.timeParameterActive = true; State.timeParameter = floatParam.Name;