Exemple #1
0
        } //END Scale 

        //---------------------------------------------//
        /// <summary>
        /// Scale a transform in local space. For RectTransform this will change the 'sizeDelta' value
        /// </summary>
        /// <typeparam name="T">Transform</typeparam>
        /// <param name="tweenThis">Accepts [Transform, RectTransform]</param>
        /// <param name="endValueMultiplier"> What multiplier should we apply onto the current scale?</param>
        /// <param name="length">How long tween should take</param>
        /// <param name="easeType">The easing you would like this tween 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 Scale<T>( this T tweenThis, float endValueMultiplier, float length, EaseCurve.EaseType easeType, Vector3? startValue = null, float delay = 0f, bool loop = false, UnityEvent onCompleteOrLoop = null ) where T : Transform
        //---------------------------------------------//
        {

            return TweenManager.Scale( tweenThis, endValueMultiplier, length, EaseCurve.GetEaseCurve( easeType ), startValue, delay, loop, onCompleteOrLoop );

        } //END Scale 
Exemple #2
0
        } //END Rotate




        //---------------------------------------------//
        /// <summary>
        /// Scale a transform in local space. For RectTransform this will change the 'sizeDelta' value
        /// </summary>
        /// <typeparam name="T">Transform</typeparam>
        /// <param name="tweenThis">Accepts [Transform, RectTransform]</param>
        /// <param name="endValue">What should the final scale be? For RectTransform we are scaling the 'sizeDelta' value so only the (X, Y) values will be used</param>
        /// <param name="length">How long tween should take</param>
        /// <param name="easeCurve">Pass in your own AnimationCurve or use the defaults provided by the EaseCurve class( EX: EaseCurve.Linear )</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 Scale<T>( this T tweenThis, Vector3 endValue, float length, AnimationCurve easeCurve, Vector3? startValue = null, float delay = 0f, bool loop = false, UnityEvent onCompleteOrLoop = null ) where T : Transform
        //---------------------------------------------//
        {

            return TweenManager.Scale( tweenThis, endValue, length, easeCurve, startValue, delay, loop, onCompleteOrLoop );

        } //END Scale