コード例 #1
0
ファイル: OutlineTween.cs プロジェクト: sampaiodias/UniTween
        /// <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);
            }
        }
コード例 #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);
        }
    }
コード例 #3
0
ファイル: TweenColor.cs プロジェクト: rhy2020/LuaGame
        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);
            }
        }
コード例 #4
0
 public static Tweener DOColor(this Outline target, ColorTweenConfig c)
 {
     return(target.DOColor(c.To, c.Duration));
 }
コード例 #5
0
 public void AnimateIdle()
 {
     _cardImage.DOColor(IdleCardColor, _animationDuration);
     _outline.DOColor(IdleOutlineColor, _animationDuration);
 }