示例#1
0
 public ColorTween(Color from, Color to, ColorTweenMode mode, float time, Action <Color> onTween, bool ignoreTimeScale = false)
 {
     StartColor         = from;
     TargetColor        = to;
     TweenMode          = mode;
     TweenDuration      = time;
     IsTimeScaleIgnored = ignoreTimeScale;
     OnColorTween       = onTween;
 }
示例#2
0
        public ColorTween(Color from, Color to, ColorTweenMode mode, float time, Action <Color> onTween, bool ignoreTimeScale = false, EasingType easingType = default)
        {
            StartColor         = from;
            TargetColor        = to;
            TweenMode          = mode;
            TweenDuration      = time;
            EasingType         = easingType;
            IsTimeScaleIgnored = ignoreTimeScale;
            OnColorTween       = onTween;

            easingFunction = EasingType.GetEasingFunction();
        }
示例#3
0
        public ColorTween(Color from, Color to, ColorTweenMode mode, float time, Action <Color> onTween,
                          bool ignoreTimeScale = false, EasingType easingType = default, UnityEngine.Object target = default)
        {
            startColor       = from;
            targetColor      = to;
            tweenMode        = mode;
            TweenDuration    = time;
            EasingType       = easingType;
            TimeScaleIgnored = ignoreTimeScale;
            this.onTween     = onTween;

            targetProvided = this.target = target;
        }