Exemple #1
0
        /// <summary>
        /// Creates and returns a Tween for the informed component.
        /// The Tween is configured based on the attribute values of this TweenData file.
        /// </summary>
        /// <param name="transform"></param>
        /// <returns></returns>
        public Tween GetTween(Outline outline)
        {
            switch (command)
            {
            case OutlineCommand.Color:
                return(outline.DOColor(color, duration));

            case OutlineCommand.Fade:
                return(outline.DOFade(to, duration));

            default:
                return(null);
            }
        }
Exemple #2
0
    public override Tween GetTween(UniTween.UniTweenTarget uniTweenTarget)
    {
        Outline outline = (Outline)GetComponent(uniTweenTarget);

        switch (command)
        {
        case OutlineCommand.Color:
            return(outline.DOColor(color, duration));

        case OutlineCommand.Fade:
            return(outline.DOFade(to, duration));

        default:
            return(null);
        }
    }
Exemple #3
0
        protected override void UpdateTweenInfo()
        {
            Outline c = this.GetComponent <Outline>();

            tween = c.DOColor(col, duration)
                    .SetDelay(delay)
                    .SetAutoKill(false)
                    .SetEase(Ease.Linear)
                    .OnComplete(() =>
            {
                OnFinished();
            })
                    .OnStepComplete(() =>
            {
                OnStepFinished();
            })
                    .Pause();

            if (playType != PlayType.Once)
            {
                tween.SetLoops(-1, playType == PlayType.Loop ? LoopType.Restart : LoopType.Yoyo);
            }
        }
Exemple #4
0
 public static Tweener DOColor(this Outline target, ColorTweenConfig c)
 {
     return(target.DOColor(c.To, c.Duration));
 }
Exemple #5
0
 public void AnimateIdle()
 {
     _cardImage.DOColor(IdleCardColor, _animationDuration);
     _outline.DOColor(IdleOutlineColor, _animationDuration);
 }