/// <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); } }
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); } }
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); } }
public static Tweener DOColor(this Outline target, ColorTweenConfig c) { return(target.DOColor(c.To, c.Duration)); }
public void AnimateIdle() { _cardImage.DOColor(IdleCardColor, _animationDuration); _outline.DOColor(IdleOutlineColor, _animationDuration); }