diff --git a/Assets/Scripts/EditorGame/Animations/Color/BaseColorChange.cs b/Assets/Scripts/EditorGame/Animations/Color/BaseColorChange.cs index ad25b56d..3cfaeedc 100644 --- a/Assets/Scripts/EditorGame/Animations/Color/BaseColorChange.cs +++ b/Assets/Scripts/EditorGame/Animations/Color/BaseColorChange.cs @@ -48,10 +48,10 @@ namespace Ichni.RhythmGame colorB.UpdateFlexibleFloat(songTime); colorA.UpdateFlexibleFloat(songTime); - if (colorR.returnType is FlexibleReturnType.MiddleExecuting || - colorG.returnType is FlexibleReturnType.MiddleExecuting || - colorB.returnType is FlexibleReturnType.MiddleExecuting || - colorA.returnType is FlexibleReturnType.MiddleExecuting) + if (colorR.returnType is FlexibleReturnType.MiddleExecuting or FlexibleReturnType.After or FlexibleReturnType.Before || + colorG.returnType is FlexibleReturnType.MiddleExecuting or FlexibleReturnType.After or FlexibleReturnType.Before || + colorB.returnType is FlexibleReturnType.MiddleExecuting or FlexibleReturnType.After or FlexibleReturnType.Before || + colorA.returnType is FlexibleReturnType.MiddleExecuting or FlexibleReturnType.After or FlexibleReturnType.Before) { animationReturnType = FlexibleReturnType.MiddleExecuting; diff --git a/Assets/Scripts/EditorGame/Animations/Color/EmissionColorChange.cs b/Assets/Scripts/EditorGame/Animations/Color/EmissionColorChange.cs index 7458107e..ad3fa888 100644 --- a/Assets/Scripts/EditorGame/Animations/Color/EmissionColorChange.cs +++ b/Assets/Scripts/EditorGame/Animations/Color/EmissionColorChange.cs @@ -47,10 +47,10 @@ namespace Ichni.RhythmGame colorB.UpdateFlexibleFloat(songTime); colorI.UpdateFlexibleFloat(songTime); - if (colorR.returnType is FlexibleReturnType.MiddleExecuting || - colorG.returnType is FlexibleReturnType.MiddleExecuting || - colorB.returnType is FlexibleReturnType.MiddleExecuting || - colorI.returnType is FlexibleReturnType.MiddleExecuting) + if (colorR.returnType is FlexibleReturnType.MiddleExecuting or FlexibleReturnType.After or FlexibleReturnType.Before || + colorG.returnType is FlexibleReturnType.MiddleExecuting or FlexibleReturnType.After or FlexibleReturnType.Before || + colorB.returnType is FlexibleReturnType.MiddleExecuting or FlexibleReturnType.After or FlexibleReturnType.Before || + colorI.returnType is FlexibleReturnType.MiddleExecuting or FlexibleReturnType.After or FlexibleReturnType.Before) { animationReturnType = FlexibleReturnType.MiddleExecuting; diff --git a/Assets/Scripts/EditorGame/Animations/Transform/LookAt.cs b/Assets/Scripts/EditorGame/Animations/Transform/LookAt.cs index a9105044..49958676 100644 --- a/Assets/Scripts/EditorGame/Animations/Transform/LookAt.cs +++ b/Assets/Scripts/EditorGame/Animations/Transform/LookAt.cs @@ -46,16 +46,15 @@ namespace Ichni.RhythmGame protected override void UpdateAnimation(float songTime) { enabling.UpdateFlexibleBool(songTime); + if (enabling.value) { animationReturnType = FlexibleReturnType.MiddleExecuting; - Vector3 lookingDirection = - (lookAtObject.transform.position - animatedObject.transform.position).normalized; + Vector3 lookingDirection = (lookAtObject.transform.position - animatedObject.transform.position).normalized; Vector3 eulerAnglesOffset = Quaternion.LookRotation(lookingDirection).eulerAngles; targetTransformSubmodule.eulerAnglesOffsetLock = true; - targetTransformSubmodule.currentEulerAngles = eulerAnglesOffset; } else diff --git a/Assets/Scripts/EditorGame/Animations/Transform/Scale.cs b/Assets/Scripts/EditorGame/Animations/Transform/Scale.cs index 02a7809c..2262148b 100644 --- a/Assets/Scripts/EditorGame/Animations/Transform/Scale.cs +++ b/Assets/Scripts/EditorGame/Animations/Transform/Scale.cs @@ -45,9 +45,9 @@ namespace Ichni.RhythmGame scaleY.UpdateFlexibleFloat(songTime); scaleZ.UpdateFlexibleFloat(songTime); - if (scaleX.returnType is FlexibleReturnType.MiddleExecuting || - scaleY.returnType is FlexibleReturnType.MiddleExecuting || - scaleZ.returnType is FlexibleReturnType.MiddleExecuting) + if (scaleX.returnType is FlexibleReturnType.MiddleExecuting or FlexibleReturnType.After or FlexibleReturnType.Before || + scaleY.returnType is FlexibleReturnType.MiddleExecuting or FlexibleReturnType.After or FlexibleReturnType.Before || + scaleZ.returnType is FlexibleReturnType.MiddleExecuting or FlexibleReturnType.After or FlexibleReturnType.Before) { animationReturnType = FlexibleReturnType.MiddleExecuting; Vector3 currentScale = new Vector3(scaleX.value, scaleY.value, scaleZ.value); diff --git a/Assets/Scripts/EditorGame/Animations/Transform/Swirl.cs b/Assets/Scripts/EditorGame/Animations/Transform/Swirl.cs index 41df53d7..db45bbcc 100644 --- a/Assets/Scripts/EditorGame/Animations/Transform/Swirl.cs +++ b/Assets/Scripts/EditorGame/Animations/Transform/Swirl.cs @@ -47,9 +47,9 @@ namespace Ichni.RhythmGame eulerAngleY.UpdateFlexibleFloat(songTime); eulerAngleZ.UpdateFlexibleFloat(songTime); - if (eulerAngleX.returnType is FlexibleReturnType.MiddleExecuting || - eulerAngleY.returnType is FlexibleReturnType.MiddleExecuting || - eulerAngleZ.returnType is FlexibleReturnType.MiddleExecuting) + if (eulerAngleX.returnType is FlexibleReturnType.MiddleExecuting or FlexibleReturnType.After or FlexibleReturnType.Before || + eulerAngleY.returnType is FlexibleReturnType.MiddleExecuting or FlexibleReturnType.After or FlexibleReturnType.Before || + eulerAngleZ.returnType is FlexibleReturnType.MiddleExecuting or FlexibleReturnType.After or FlexibleReturnType.Before) { animationReturnType = FlexibleReturnType.MiddleExecuting; Vector3 currentEulerAngles = new Vector3(eulerAngleX.value, eulerAngleY.value, eulerAngleZ.value);