예제 #1
0
        /// <summary>
        ///     Tweens to the specified value.
        /// </summary>
        /// <param name="target">The target.</param>
        /// <param name="speed">The speed.</param>
        /// <param name="type">The type.</param>
        /// <param name="replace">if set to <c>true</c> [replace].</param>
        internal void TweenTo(double target, double speed, TweenTypes type, bool replace)
        {
            target = Math.Max(MinAmount, Math.Min(MaxAmount, target));

            var t = TweenData.Setup(target, speed, type);

            if (replace)
            {
                Tween.Clear();
            }
            Tween.Add(t);
        }
예제 #2
0
        /// <summary>
        /// Tweens to the specified value.
        /// </summary>
        /// <param name="target">The target.</param>
        /// <param name="time">The time.</param>
        /// <param name="type">The type.</param>
        /// <param name="replace">if set to <c>true</c> [replace].</param>
        internal void TweenTo(double target, long time, TweenTypes type, bool replace)
        {
            target = Math.Max(this.MinAmount, Math.Min(this.MaxAmount, target));

            var t = TweenData.Setup(target, time, type);

            if (replace)
            {
                this.Tween.Clear();
            }
            this.Tween.Add(t);
        }