Ejemplo n.º 1
0
        } //END Move

        //------------------------------------------------------------------//
        /// <summary>
        /// Move a Transform across local or global space
        /// </summary>
        /// <typeparam name="T">Transform</typeparam>
        /// <param name="tweenThis">Accepts [Transform, RectTransform]</param>
        /// <param name="endValue">The position you would like to move this Transform to</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="useLocalOrWorldSpace">[OPTIONAL] Would you like this transform to move in local or global space?</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 Move<T>( this T tweenThis, Vector3 endValue, float length, EaseCurve.EaseType easeType, Vector3? startValue = null, bxrTweenPosition.LocalOrWorldSpace useLocalOrWorldSpace = bxrTweenPosition.LocalOrWorldSpace.Local, float delay = 0f, bool loop = false, UnityEvent onCompleteOrLoop = null ) where T : Transform
        //------------------------------------------------------------------//
        {

            return TweenManager.Move( tweenThis, endValue, length, EaseCurve.GetEaseCurve( easeType ), startValue, useLocalOrWorldSpace, delay, loop, onCompleteOrLoop );

        } //END Move