Beispiel #1
0
        public void TweenValue(float tweenPercent)
        {
            if (!TargetValid)
            {
                return;
            }

            var newValue = EasingType.Tween(startValue, targetValue, tweenPercent);

            onTween.Invoke(newValue);
        }
Beispiel #2
0
        public void TweenValue(float tweenPercent)
        {
            if (!TargetValid)
            {
                return;
            }

            var newValue = new Vector3(
                EasingType.Tween(startValue.x, targetValue.x, tweenPercent),
                EasingType.Tween(startValue.y, targetValue.y, tweenPercent),
                EasingType.Tween(startValue.z, targetValue.z, tweenPercent)
                );

            onTween.Invoke(newValue);
        }
Beispiel #3
0
        public void TweenValue(float tweenPercent)
        {
            if (!TargetValid)
            {
                return;
            }

            var newColor = default(Color);

            newColor.r = tweenMode == ColorTweenMode.Alpha ? startColor.r : EasingType.Tween(startColor.r, targetColor.r, tweenPercent);
            newColor.g = tweenMode == ColorTweenMode.Alpha ? startColor.g : EasingType.Tween(startColor.g, targetColor.g, tweenPercent);
            newColor.b = tweenMode == ColorTweenMode.Alpha ? startColor.b : EasingType.Tween(startColor.b, targetColor.b, tweenPercent);
            newColor.a = tweenMode == ColorTweenMode.RGB ? startColor.a : EasingType.Tween(startColor.a, targetColor.a, tweenPercent);

            onTween.Invoke(newColor);
        }