} //END Rotate //---------------------------------------------// /// <summary> /// Rotates a Transform or RectTransform using Quaternions. Supply this function with the localEulerAngles for the 'endValue' and 'startValue' /// </summary> /// <typeparam name="T">Transform</typeparam> /// <param name="tweenThis">Accepts [Transform, RectTransform]</param> /// <param name="endValue">What should the localEulerAngles for the transform be by the end of this rotation?</param> /// <param name="length">How long tween should take</param> /// <param name="easeType">What easing you would like to use</param> /// <param name="startValue">[OPTIONAL] Value to start from. If not provided we will use the existing value from the 'tweenThis' object</param> /// <param name="delay">[OPTIONAL] How long we should wait before starting to tween</param> /// <param name="loop">[OPTIONAL] Keep the tween running via a loop indefinitely</param> /// <param name="onCompleteOrLoop">[OPTIONAL] A UnityEvent to call once the tween has finished or completed a single loop</param> /// <returns></returns> public static bxrTween Rotate<T>( this T tweenThis, Vector3 endValue, float length, EaseCurve.EaseType easeType, Vector3? startValue = null, float delay = 0f, bool loop = false, UnityEvent onCompleteOrLoop = null ) where T : Transform //---------------------------------------------// { return TweenManager.Rotate( tweenThis, endValue, length, EaseCurve.GetEaseCurve( easeType ), startValue, delay, loop, onCompleteOrLoop ); } //END Rotate